ghost03MinMax.out2 Made with ghost03.rb, Dec 17, 2007. Algorithm: Global identifiers: $alphabet = %w[a b c d e f g h i j k l m n o p q r s t u v w x y z] $gamestr=["G","H","O","S","T"] $players=[lambda{ |x| computer2(x)}, lambda{ |x,y,z,letter| computerminmax(x,y,z,letter)}] $words = [] - the dictionary 1. "Outer method", non-recursive: computerminmax(wordstring, player, level, nextletter) if the word string is empty, return a random letter, $alphabet[rand(26)] otherwise: search for wordstring in the dictionary $words (my search method returned a list with two items: list[0] -> the index, if found, of wordstring in the dictionary, -1 if not found list[1] -> a list of strings of length wordstring.length+1, these strings could form words in the dictionary) if wordstring is in the dictionary (index >= 0) and its length is greater than or equal to 4, return a special character such as "!" otherwise (if for some reason there are no strings extending from wordstring return a random letter) loop through the list of strings extending one letter from wordstring: for each of these strings, if they are words in the dictionary or they could be words in the dictionary, call the recursive MinMax version of this method: choice=computerminmaxAux(temp, player % $numplayers, (player+1)% $numplayers, level+1, current next letter -> matches[i][-1].chr ) "choice" is a list of two items: the index of the player who formed a word at some recursive level. the current next letter that led to finding this word if your choicelist does not include "choice", add choice to the choicelist also keep a list of favorable choices: those in which the player forming the word is different from you, the current player (you don't want to be the one forming the word) if choicelistfavorable.length > 0 choose a random index and pick a letter from this favorable list Don't choose any special characters, ("#"), you may have returned for some reason otherwise there are no favorable letters and return a random actual letter from choicelist return letter 2. "Inner method", recursive: computerminmaxAux(wordstring, previousplayer, player, level, nextletter) if the word string is empty, return a random letter, $alphabet[rand(26)] otherwise: search for wordstring in the dictionary $words (my search method returned a list with two items: list[0] -> the index, if found, of wordstring in the dictionary, -1 if not found list[1] -> a list of strings of length wordstring.length+1, these strings could form words in the dictionary) if wordstring is in the dictionary (index >= 0) and its length is greater than or equal to 4, return a list of [prevplayer,nextletter] otherwise (if for some reason there are no strings extending from wordstring return a list with a special character such as "#" [currentplayer, "#"]) loop through the list of strings extending one letter from wordstring: for each of these strings, if they are words in the dictionary or they could be words in the dictionary, make a recursive call to this method: choice=computerminmaxAux(temp, player % $numplayers, (player+1)% $numplayers, level+1, current next letter -> matches[i][-1].chr ) "choice" is a list of two items: the index of the player who formed a word at some recursive level. the current next letter that led to finding this word return "choice" PLAYER0 IS A COMPUTER WITHOUT MINMAX, LOOKING ONLY ONE CHOICE AHEAD PLAYER1 IS A MINMAX COMPUTER, LOOKING AHEAD TO THE NEXT COMPLETED WORD numplayers= 2 New word to pick Player 0 pick a letter, Computer2 adding to: Current word: ["f"], string: f f not found Initial matches: ["fa", "fe", "fi", "fl", "fo", "fr", "fu"] Player 1 pick a letter Computer level 0 adding to f Player 1, Computer level 0 matches: ["fa", "fe", "fi", "fl", "fo", "fr", "fu"] In TOP MOST LEVEL, player 1 picking a Found a word: fable made by player 0 at level=4, returning nextletter: a In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "a"] In TOP MOST LEVEL, player 1 picking e Found a word: fear made by player 1 at level=3, returning nextletter: e In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "e"] In TOP MOST LEVEL, player 1 picking i Found a word: fiance made by player 1 at level=5, returning nextletter: i In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "i"] In TOP MOST LEVEL, player 1 picking l Found a word: flabbergast made by player 0 at level=10, returning nextletter: l In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "l"] In TOP MOST LEVEL, player 1 picking o Found a word: foal made by player 1 at level=3, returning nextletter: o In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "o"] In TOP MOST LEVEL, player 1 picking r Found a word: fraction made by player 1 at level=7, returning nextletter: r In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "r"] In TOP MOST LEVEL, player 1 picking u Found a word: fudge made by player 0 at level=4, returning nextletter: u In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "u"] TOP LEVEL, player = 1, current word=f, choicelist=[[0, "a"], [1, "e"], [1, "i"], [0, "l"], [1, "o"], [1, "r"], [0, "u"]] TOP LEVEL, player = 1, current word=f, favorable choicelist=[[0, "a"], [0, "l"], [0, "u"]] TOP LEVEL, player = 1, picking index 1 from favorable list: [0, "l"], picking letter l Current word: ["f", "l"], string: fl fl not found Initial matches: ["fla", "fle", "fli", "flo", "flu", "fly"] Player 0 pick a letter, Computer2 adding to fl Current word: ["f", "l", "u"], string: flu flu found at position 14770 Player 1 pick a letter Player 1, Computer level 0 adding to flu Player 1, Computer level 0 matches: ["fluc", "flue", "fluf", "flui", "fluk", "flun", "fluo", "flur", "flus", "flut", "flux"] In TOP MOST LEVEL, player 1 picking c Found a word: fluctuate made by player 0 at level=6, returning nextletter: c In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "c"] In TOP MOST LEVEL, player 1 picking e Found a word: flue made by player 1 at level=1, returning nextletter: e In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "e"] In TOP MOST LEVEL, player 1 picking f Found a word: fluff made by player 0 at level=2, returning nextletter: f In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "f"] In TOP MOST LEVEL, player 1 picking i Found a word: fluid made by player 0 at level=2, returning nextletter: i In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "i"] In TOP MOST LEVEL, player 1 picking k Found a word: fluke made by player 0 at level=2, returning nextletter: k In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "k"] In TOP MOST LEVEL, player 1 picking n Found a word: flung made by player 0 at level=2, returning nextletter: n In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "n"] In TOP MOST LEVEL, player 1 picking o Found a word: fluoresce made by player 0 at level=6, returning nextletter: o In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "o"] In TOP MOST LEVEL, player 1 picking r Found a word: flurried made by player 1 at level=5, returning nextletter: r In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "r"] In TOP MOST LEVEL, player 1 picking s Found a word: flush made by player 0 at level=2, returning nextletter: s In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "s"] In TOP MOST LEVEL, player 1 picking t Found a word: flute made by player 0 at level=2, returning nextletter: t In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "t"] In TOP MOST LEVEL, player 1 picking x Found a word: flux made by player 1 at level=1, returning nextletter: x In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "x"] TOP LEVEL, player = 1, current word=flu, choicelist=[[0, "c"], [1, "e"], [0, "f"], [0, "i"], [0, "k"], [0, "n"], [0, "o"], [1, "r"], [0, "s"], [0, "t"], [1, "x"]] favorable choicelist=[[0, "c"], [0, "f"], [0, "i"], [0, "k"], [0, "n"], [0, "o"], [0, "s"], [0, "t"]] TOP LEVEL, player = 1, picking index 7 from favorable list: [0, "t"], picking letter t Current word: ["f", "l", "u", "t"], string: flut flut not found Initial matches: ["flute", "fluti", "flutt"] Player 0 pick a letter, Computer2 adding to flut Current word: ["f", "l", "u", "t", "i"], string: fluti fluti not found Initial matches: ["flutin"] Player 1 pick a letter Player 1, Computer level 0 adding to fluti Player 1, Computer level 0 matches: ["flutin"] In TOP MOST LEVEL, player 1 picking n Found a word: fluting made by player 0 at level=2, returning nextletter: n In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "n"] TOP LEVEL, player = 1, current word=fluti, choicelist=[[0, "n"]] favorable choicelist=[[0, "n"]] TOP LEVEL, player = 1, picking index 0 from favorable list: [0, "n"], picking letter n Current word: ["f", "l", "u", "t", "i", "n"], string: flutin flutin not found Initial matches: ["fluting"] Player 0 pick a letter, Computer2 adding to flutin Current word: ["f", "l", "u", "t", "i", "n", "g"], string: fluting fluting found at position 14801 Player 1 pick a letter, Computer level 0 adding to fluting Found a word, player 1 returning '!' CHALLENGE Current word: fluting fluting found at position 14801 Challenge issued, player 0 has ["G"], all players: [["G"], []] New word to pick Player 0 pick a letter, Computer2 adding to Current word: ["l"], string: l l not found Initial matches: ["la", "le", "li", "lo", "lu", "ly"] Player 1 pick a letter, Computer level 0 adding to l Player 1, Computer level 0 matches: ["la", "le", "li", "lo", "lu", "ly"] In TOP MOST LEVEL, player 1 picking a Found a word: label made by player 0 at level=4, returning nextletter: a In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "a"] In TOP MOST LEVEL, player 1 picking e Found a word: lead made by player 1 at level=3, returning nextletter: e In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "e"] In TOP MOST LEVEL, player 1 picking i Found a word: liabilities made by player 0 at level=10, returning nextletter: i In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "i"] In TOP MOST LEVEL, player 1 picking o Found a word: load made by player 1 at level=3, returning nextletter: o In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "o"] In TOP MOST LEVEL, player 1 picking u Found a word: lubricant made by player 0 at level=8, returning nextletter: u In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "u"] In TOP MOST LEVEL, player 1 picking y Found a word: lying made by player 0 at level=4, returning nextletter: y In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "y"] TOP LEVEL, player = 1, current word=l, choicelist=[[0, "a"], [1, "e"], [0, "i"], [1, "o"], [0, "u"], [0, "y"]] favorable choicelist=[[0, "a"], [0, "i"], [0, "u"], [0, "y"]] TOP LEVEL, player = 1, picking index 3 from favorable list: [0, "y"], picking letter y Current word: ["l", "y"], string: ly ly not found Initial matches: ["lyi", "lym", "lyn", "lyr"] Player 0 pick a letter, Computer2 adding to ly Current word: ["l", "y", "n"], string: lyn lyn not found Initial matches: ["lync", "lynx"] Player 1 pick a letter, Computer level 0 adding to lyn Player 1, Computer level 0 matches: ["lync", "lynx"] In TOP MOST LEVEL, player 1 picking c Found a word: lynch made by player 0 at level=2, returning nextletter: c In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "c"] In TOP MOST LEVEL, player 1 picking x Found a word: lynx made by player 1 at level=1, returning nextletter: x In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "x"] TOP LEVEL, player = 1, current word=lyn, choicelist=[[0, "c"], [1, "x"]] favorable choicelist=[[0, "c"]] TOP LEVEL, player = 1, picking index 0 from favorable list: [0, "c"], picking letter c Current word: ["l", "y", "n", "c"], string: lync lync not found Initial matches: ["lynch"] Player 0 pick a letter, Computer2 adding to lync Current word: ["l", "y", "n", "c", "h"], string: lynch lynch found at position 21093 Player 1 pick a letter, Computer level 0 adding to lynch Found a word, player 1 returning '!' CHALLENGE Current word: lynch lynch found at position 21093 Challenge issued, player 0 has ["G", "H"], all players: [["G", "H"], []] New word to pick Player 0 pick a letter, Computer2 adding to Current word: ["e"], string: e e not found Initial matches: ["ea", "eb", "ec", "ed", "ee", "ef", "eg", "ei", "ej", "ek", "el", "em", "en", "ep", "eq", "er", "es", "et", "eu", "ev", "ew", "ex", "ey"] Player 1 pick a letter, Computer level 0 adding to e Player 1, Computer level 0 matches: ["ea", "eb", "ec", "ed", "ee", "ef", "eg", "ei", "ej", "ek", "el", "em", "en", "ep", "eq", "er", "es", "et", "eu", "ev", "ew", "ex", "ey"] In TOP MOST LEVEL, player 1 picking a Found a word: each made by player 1 at level=3, returning nextletter: a In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "a"] In TOP MOST LEVEL, player 1 picking b Found a word: ebbing made by player 1 at level=5, returning nextletter: b In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "b"] In TOP MOST LEVEL, player 1 picking c Found a word: eccentric made by player 0 at level=8, returning nextletter: c In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "c"] In TOP MOST LEVEL, player 1 picking d Found a word: eddies made by player 1 at level=5, returning nextletter: d In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "d"] In TOP MOST LEVEL, player 1 picking e Found a word: eelgrass made by player 1 at level=7, returning nextletter: e In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "e"] In TOP MOST LEVEL, player 1 picking f Found a word: effect made by player 1 at level=5, returning nextletter: f In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "f"] In TOP MOST LEVEL, player 1 picking g Found a word: egalitarian made by player 0 at level=10, returning nextletter: g In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "g"] In TOP MOST LEVEL, player 1 picking i Found a word: eigenfunction made by player 0 at level=12, returning nextletter: i In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "i"] In TOP MOST LEVEL, player 1 picking j Found a word: ejaculate made by player 0 at level=8, returning nextletter: j In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "j"] In TOP MOST LEVEL, player 1 picking k Found a word: eked made by player 1 at level=3, returning nextletter: k In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "k"] In TOP MOST LEVEL, player 1 picking l Found a word: elaborate made by player 0 at level=8, returning nextletter: l In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "l"] In TOP MOST LEVEL, player 1 picking m Found a word: emaciate made by player 1 at level=7, returning nextletter: m In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "m"] In TOP MOST LEVEL, player 1 picking n Found a word: enable made by player 1 at level=5, returning nextletter: n In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "n"] In TOP MOST LEVEL, player 1 picking p Found a word: epaulet made by player 0 at level=6, returning nextletter: p In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "p"] In TOP MOST LEVEL, player 1 picking q Found a word: equal made by player 0 at level=4, returning nextletter: q In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "q"] In TOP MOST LEVEL, player 1 picking r Found a word: eradicate made by player 0 at level=8, returning nextletter: r In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "r"] In TOP MOST LEVEL, player 1 picking s Found a word: escalate made by player 1 at level=7, returning nextletter: s In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "s"] In TOP MOST LEVEL, player 1 picking t Found a word: etch made by player 1 at level=3, returning nextletter: t In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "t"] In TOP MOST LEVEL, player 1 picking u Found a word: eucalyptus made by player 1 at level=9, returning nextletter: u In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "u"] In TOP MOST LEVEL, player 1 picking v Found a word: evacuate made by player 1 at level=7, returning nextletter: v In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "v"] In TOP MOST LEVEL, player 1 picking w Found a word: ewes made by player 1 at level=3, returning nextletter: w In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "w"] In TOP MOST LEVEL, player 1 picking x Found a word: exacerbate made by player 1 at level=9, returning nextletter: x In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "x"] In TOP MOST LEVEL, player 1 picking y Found a word: eyeball made by player 0 at level=6, returning nextletter: y In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "y"] TOP LEVEL, player = 1, current word=e, choicelist=[[1, "a"], [1, "b"], [0, "c"], [1, "d"], [1, "e"], [1, "f"], [0, "g"], [0, "i"], [0, "j"], [1, "k"], [0, "l"], [1, "m"], [1, "n"], [0, "p"], [0, "q"], [0, "r"], [1, "s"], [1, "t"], [1, "u"], [1, "v"], [1, "w"], [1, "x"], [0, "y"]] favorable choicelist=[[0, "c"], [0, "g"], [0, "i"], [0, "j"], [0, "l"], [0, "p"], [0, "q"], [0, "r"], [0, "y"]] TOP LEVEL, player = 1, picking index 6 from favorable list: [0, "q"], picking letter q Current word: ["e", "q"], string: eq eq not found Initial matches: ["equ"] Player 0 pick a letter, Computer2 adding to eq Current word: ["e", "q", "u"], string: equ equ not found Initial matches: ["equa", "eque", "equi"] Player 1 pick a letter, Computer level 0 adding to equ Player 1, Computer level 0 matches: ["equa", "eque", "equi"] In TOP MOST LEVEL, player 1 picking a Found a word: equal made by player 0 at level=2, returning nextletter: a In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "a"] In TOP MOST LEVEL, player 1 picking e Found a word: equestrian made by player 1 at level=7, returning nextletter: e In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "e"] In TOP MOST LEVEL, player 1 picking i Found a word: equidistant made by player 0 at level=8, returning nextletter: i In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "i"] TOP LEVEL, player = 1, current word=equ, choicelist=[[0, "a"], [1, "e"], [0, "i"]] favorable choicelist=[[0, "a"], [0, "i"]] TOP LEVEL, player = 1, picking index 1 from favorable list: [0, "i"], picking letter i Current word: ["e", "q", "u", "i"], string: equi equi not found Initial matches: ["equid", "equil", "equin", "equip", "equit", "equiv"] Player 0 pick a letter, Computer2 adding to equi Current word: ["e", "q", "u", "i", "t"], string: equit equit not found Initial matches: ["equita", "equity"] Player 1 pick a letter, Computer level 0 adding to equit Player 1, Computer level 0 matches: ["equita", "equity"] In TOP MOST LEVEL, player 1 picking a Found a word: equitable made by player 0 at level=4, returning nextletter: a In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "a"] In TOP MOST LEVEL, player 1 picking y Found a word: equity made by player 1 at level=1, returning nextletter: y In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "y"] TOP LEVEL, player = 1, current word=equit, choicelist=[[0, "a"], [1, "y"]] favorable choicelist=[[0, "a"]] TOP LEVEL, player = 1, picking index 0 from favorable list: [0, "a"], picking letter a Current word: ["e", "q", "u", "i", "t", "a"], string: equita equita not found Initial matches: ["equitab"] Player 0 pick a letter, Computer2 adding to equita Current word: ["e", "q", "u", "i", "t", "a", "b"], string: equitab equitab not found Initial matches: ["equitabl"] Player 1 pick a letter, Computer level 0 adding to equitab Player 1, Computer level 0 matches: ["equitabl"] In TOP MOST LEVEL, player 1 picking l Found a word: equitable made by player 0 at level=2, returning nextletter: l In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "l"] TOP LEVEL, player = 1, current word=equitab, choicelist=[[0, "l"]] favorable choicelist=[[0, "l"]] TOP LEVEL, player = 1, picking index 0 from favorable list: [0, "l"], picking letter l Current word: ["e", "q", "u", "i", "t", "a", "b", "l"], string: equitabl equitabl not found Initial matches: ["equitable", "equitably"] Player 0 pick a letter, Computer2 adding to equitabl Current word: ["e", "q", "u", "i", "t", "a", "b", "l", "e"], string: equitable equitable found at position 13097 Player 1 pick a letter, Computer level 0 adding to equitable Found a word, player 1 returning '!' CHALLENGE Current word: equitable equitable found at position 13097 Challenge issued, player 0 has ["G", "H", "O"], all players: [["G", "H", "O"], []] New word to pick Player 0 pick a letter, Computer2 adding to Current word: ["x"], string: x x not found Initial matches: ["xy"] Player 1 pick a letter, Computer level 0 adding to x Player 1, Computer level 0 matches: ["xy"] In TOP MOST LEVEL, player 1 picking y Found a word: xylophone made by player 0 at level=8, returning nextletter: y In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "y"] TOP LEVEL, player = 1, current word=x, choicelist=[[0, "y"]] favorable choicelist=[[0, "y"]] TOP LEVEL, player = 1, picking index 0 from favorable list: [0, "y"], picking letter y Current word: ["x", "y"], string: xy xy not found Initial matches: ["xyl"] Player 0 pick a letter, Computer2 adding to xy Current word: ["x", "y", "l"], string: xyl xyl not found Initial matches: ["xylo"] Player 1 pick a letter, Computer level 0 adding to xyl Player 1, Computer level 0 matches: ["xylo"] In TOP MOST LEVEL, player 1 picking o Found a word: xylophone made by player 0 at level=6, returning nextletter: o In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "o"] TOP LEVEL, player = 1, current word=xyl, choicelist=[[0, "o"]] favorable choicelist=[[0, "o"]] TOP LEVEL, player = 1, picking index 0 from favorable list: [0, "o"], picking letter o Current word: ["x", "y", "l", "o"], string: xylo xylo not found Initial matches: ["xylop"] Player 0 pick a letter, Computer2 adding to xylo Current word: ["x", "y", "l", "o", "p"], string: xylop xylop not found Initial matches: ["xyloph"] Player 1 pick a letter, Computer level 0 adding to xylop Player 1, Computer level 0 matches: ["xyloph"] In TOP MOST LEVEL, player 1 picking h Found a word: xylophone made by player 0 at level=4, returning nextletter: h In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "h"] TOP LEVEL, player = 1, current word=xylop, choicelist=[[0, "h"]] favorable choicelist=[[0, "h"]] TOP LEVEL, player = 1, picking index 0 from favorable list: [0, "h"], picking letter h Current word: ["x", "y", "l", "o", "p", "h"], string: xyloph xyloph not found Initial matches: ["xylopho"] Player 0 pick a letter, Computer2 adding to xyloph Current word: ["x", "y", "l", "o", "p", "h", "o"], string: xylopho xylopho not found Initial matches: ["xylophon"] Player 1 pick a letter, Computer level 0 adding to xylopho Player 1, Computer level 0 matches: ["xylophon"] In TOP MOST LEVEL, player 1 picking n Found a word: xylophone made by player 0 at level=2, returning nextletter: n In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "n"] TOP LEVEL, player = 1, current word=xylopho, choicelist=[[0, "n"]] favorable choicelist=[[0, "n"]] TOP LEVEL, player = 1, picking index 0 from favorable list: [0, "n"], picking letter n Current word: ["x", "y", "l", "o", "p", "h", "o", "n"], string: xylophon xylophon not found Initial matches: ["xylophone"] Player 0 pick a letter, Computer2 adding to xylophon Current word: ["x", "y", "l", "o", "p", "h", "o", "n", "e"], string: xylophone xylophone found at position 38519 Player 1 pick a letter, Computer level 0 adding to xylophone Found a word, player 1 returning '!' CHALLENGE Current word: xylophone xylophone found at position 38519 Challenge issued, player 0 has ["G", "H", "O", "S"], all players: [["G", "H", "O", "S"], []] New word to pick Player 0 pick a letter, Computer2 adding to Current word: ["q"], string: q q not found Initial matches: ["qu"] Player 1 pick a letter, Computer level 0 adding to q Player 1, Computer level 0 matches: ["qu"] In TOP MOST LEVEL, player 1 picking u Found a word: quack made by player 0 at level=4, returning nextletter: u In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "u"] TOP LEVEL, player = 1, current word=q, choicelist=[[0, "u"]] favorable choicelist=[[0, "u"]] TOP LEVEL, player = 1, picking index 0 from favorable list: [0, "u"], picking letter u Current word: ["q", "u"], string: qu qu not found Initial matches: ["qua", "que", "qui", "quo"] Player 0 pick a letter, Computer2 adding to qu Current word: ["q", "u", "o"], string: quo quo found at position 27649 Player 1 pick a letter, Computer level 0 adding to quo Player 1, Computer level 0 matches: ["quon", "quor", "quot"] In TOP MOST LEVEL, player 1 picking n Found a word: quonset made by player 0 at level=4, returning nextletter: n In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "n"] In TOP MOST LEVEL, player 1 picking r Found a word: quorum made by player 1 at level=3, returning nextletter: r In TOP MOST LEVEL, player 1, Computer level 0 received choice:[1, "r"] In TOP MOST LEVEL, player 1 picking t Found a word: quota made by player 0 at level=2, returning nextletter: t In TOP MOST LEVEL, player 1, Computer level 0 received choice:[0, "t"] TOP LEVEL, player = 1, current word=quo, choicelist=[[0, "n"], [1, "r"], [0, "t"]] favorable choicelist=[[0, "n"], [0, "t"]] TOP LEVEL, player = 1, picking index 1 from favorable list: [0, "t"], picking letter t Current word: ["q", "u", "o", "t"], string: quot quot not found Initial matches: ["quota", "quote", "quoth", "quoti"] Player 0 pick a letter, Computer2 adding to quot Current word: ["q", "u", "o", "t", "h"], string: quoth quoth found at position 27659 Player 1 pick a letter, Computer level 0 adding to quoth Found a word, player 1 returning '!' CHALLENGE Current word: quoth quoth found at position 27659 Challenge issued, player 0 has ["G", "H", "O", "S", "T"], all players: [["G", "H", "O", "S", "T"], []] Player 0 loses, game over