Closed JohnAD closed 7 years ago
A point of curiosity: the example Connect Four game appears to have once used DictTT
as it has an import
statement:
http://zulko.github.io/easyAI/examples/games.html#connect-4
However, it is no longer being invoked. Ironically, it is using the .play()
method with two AIs, which is the very situation I am trying to make work.
Odd coincidence possibly as history does not show ConnectFour ever supporting a transposition table.
As to the looping problem: my bad. The problem was simply not creating a valid tuple with tt_entry
. Sometimes it's the obvious stuff in retrospect. Ironically, use of TT
slows my game down rather than speed it up. (2.5s vs 13s on a test run.) I suspect that is because each branch can be between 3 and 60 possible moves. It fans out too much.
The title of the subject remains true: the docs are out of date (assuming TT is the correct class, not DictTT.)
I'd be happy to update the documentation. I'm also thinking:
tt_entry
from the get started with easyAI
page as it is a later topicMake the AI Faster
to it's own main section (between examples
and get started
). Add a new page to that section talking about solving the game to use tt in place of the AI class.docs updating with PR #21
Following the documentation at:
http://zulko.github.io/easyAI/get_started.html#human-and-ai-players
Adding
tt=table
to Negamax, wheretable
that is an instance ofDictTT
results in:Looking at the
Nim.py
example, it appears that perhaps that theTT
class is supposed to be used instead. Using that, unfortunately, appears to create an infinite loop where a few board states are toggled back and forth when the.play()
method is invoked with two AI players.The
id_solve
function used byNim.py
does not appear to have the looping problem. so that might be a starting point for diagnosis. The game I'm writing is, unfortunately, not really solvable. Not with an off-the-shelf computer anyway. :)I'm happy to help fix this, but I'd like feedback first. I'd hate to solve a problem that already has a quick work-around. :)
If curious, I'm using a genetics algorithm with easyAI to optimize the relative value of tactics and short-term strategies. My YouTube video for this: https://www.youtube.com/watch?v=Y6P-_sTYQcM