04-28-2006 07:12 AM
Shane,
the good (and bad) thing about those challenges: If you start thinking about it, you hardly can stop the brain cells dancing with that theme...
04-28-2006 07:31 AM
04-28-2006 09:07 AM
04-28-2006 11:43 AM
@Bruce Ammons wrote:
I wrote one just for kicks, and discovered that the random player still won around 0.1%, which means my algorithm is flawed.
That could actually be a good way to resolve ties! Rank the entries with the same score according to the loosing percentage angainst the random player after a few million games. 😄
I also quickly made a very primitive player just for kicks (purely static evaluation), but it is not perfect. As X it still wins about 4 in a million (very reproducible after 10 million tries), while as O it wins about 5-7%. 😞 Is yours better than that playing as O?
Also make sure to test for legality in your tester (selected coordinates don't yet contain a piece AND are in the range 0..3) and immediately disqualify flawed entries. 😉
04-28-2006 12:59 PM
I'm just reading this thread for now... and being entertained 😉
Not to modify the contest, but an interesting challenge would be the ability to play Tic-tac-toe to win, by having people's code play against one another. That way whoever actually wins most often and fastest (less time) actually wins..
Just throwing a silly idea...
Ray
04-28-2006 02:53 PM
@JoeLabView wrote:
Not to modify the contest, but an interesting challenge would be the ability to play Tic-tac-toe to win, by having people's code play against one another.
Hey, I did a 20 second modification to my draft and simply inverted the evaluation function. Result (Win%, loose%,draw%) against the randomizer:
As X: [29%, 0%(!), 71%]
As O: [22.5%, 0.01%, 77.5%%]
Beat that!
Interestingly, against itself it is a 100% draw...
04-28-2006 02:57 PM
@altenbach wrote:
Interestingly, against itself it is a 100% draw...
04-28-2006 04:27 PM
jasonhill wroteI would expect it to be doubly true if both players are using the same algorythm.
04-28-2006 07:51 PM
05-01-2006 03:26 PM - edited 05-01-2006 03:26 PM
It seems that it is easy to fully analyze the problem and make a god-like program that fits in a few MB. This is similar to the fully analyzed chess endgame databases originally started by Ken Thompson many years ago.
Removing all symmetry related positions, all illegal positions (number of X=number of O or O+1) and everything with more than two rows of four, there is not much left, for example there are only three unique moves to start the game.
I wrote a quick a dirty program to generate all possible legal positions (takes only a few minutes). now it would be easy to recursively create a scoring table to produce a (win in t, loose in t or draw) to every possible case. Attached in a graph of the number of unique positions as a function of the number of pieces on the board. Anyone got a similar result?
Message Edited by altenbach on 05-01-2006 01:26 PM