Advertisement

Chess ai

Started by September 09, 2004 06:57 AM
3 comments, last by Nice Coder 20 years, 2 months ago
My idea basically involves using an extra table to allow the chess engine to "learn" from its mistakes and make up for a non-perfect evaluation function. In this table, each entry would have the following information: Hash for position|score|Hash of parent|hashes of children| scores of children This table found then be searched (binary searched, log2 time), and if a record is found, that score is used. Now for the new part, In between games, it runs in a loop: while not_playing_a_game pick a random point in the table propogate that score point up, from child to parent until it reaches the root position loop At every stage, it determines the score that a node should have(nscore from now on), by selecting the maximum or the minimum score of the children (like minimax, it uses the "new" information ie. after it has been updated from the last iteration). it would change the scores using a formula like: score = (score + nscore) / 2 Once this is implemented; if you use this in a chess engine with no opening book on depth 1, it would fall for the 4 move checkmate. But once it has thought about this position for a while, it would tend to avoid the moves it made that lead to the checkmate. it would then keep changing which moves it plays until it finds a countermeasure. I would say that thhis iwould be usefull because it would steer clear from situations that by using only the eval function the chess computer would fall right into. Is this a good idea/bad idea/already used idea? From, Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Wether it's a good idea or not I suggest you play around with it more. Sometimes the idea you think are the best turn out to be too combersome to use, and others you may not like might actually be incredibly effective. Not only will this performance evaluator learn from it's random mistakes, but you'll also learn what you need to add or remove in order to make it more effective.

Start somewhere and go with it and you may find a new way of doing things, if it's and old way you may imporve apon it. In short it does sound like you are using a performance evaluator to create the comprehansive chess table... and just listing information and searching a table is fast.
God bless-Gryfang
Advertisement
the real question, is what is the amount of data you will store ?!?!
no matter how big this hash is enteries will be overwritten, or you will need really really big sizes, in terms of terabytes.
you know after a specific number of games played (a lot) he can during the out of game prog erase all bad moves (risky) and then if the move isn't stored then it's assumed to be a bad move and you don't have to store it... I DO NOT THINK IT'S A GOOD IDEA WITH CHESS.
God bless-Gryfang
1. i do not have a chess engine... (and please don't point me at GNU chess... i do not know C++ well enough yet)

2. i know that storing the game tree of chess would take ectobytes (not terabytes), but how much of that game tree is common? i'm quite sure that even if it was extobytes in length, it would only be learning it one move at a time... Uncommon (or unneeded entries) could be removed.

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.

This topic is closed to new replies.

Advertisement