python Programming Glossary: endstates
How to solve the “Mastermind” guessing game? http://stackoverflow.com/questions/1185634/how-to-solve-the-mastermind-guessing-game itertools.permutations colours holes score mastermindScore endstates Pegs holes 0 def mediumGame return mastermind Yellow Blue Green.. 'Branch' 'result subtree' def lazySolutionTree G V score endstates kwargs decision bestDecision V G score branches Branch result.. V G score branches Branch result None if result in endstates else lazySolutionTree G pV score score endstates endstates..
|