I like the flashing myself :D .
You can tell where the comp moved because flashing flashes each individual piece, so you can tell which one is the new piece put by the comp.
PJYelton, to my knowledge, my last release DOES looks 5 moves down, i fixed the problem earlier, as i told you. I even tested it by making the move visible on screen while the computer is trying eacah possible move. I added that execute==2 thing later on to remove all the flickering on the screen.
Anyway, i've added some weights, now it *usually avoids some bad spots for some strange reason. It *should avoid the bad spots whenever there are better positions available. But sometimes it doesn't, and i can't figure out why. Maybe it's got something to do with the minimax algo messing with the scores :confused: You can see that it avoids spots around corners most of the times if you run the demo play.
Edit: Removed the files, new version can be downloaded below.
But where does it make the move? The only possibility is in the checkmove function, which in turn calls the direction search. It looks to see how many pieces can be turned, but only actually makes the move if execute equals one. If you think that it is making the move, tell me where, maybe I'm just blind! :D
I feel like I'm being nitpicky, I'm sorry :( I really do think you've done a great job. :D
Omg..how can i be so stupit :(
Sorry, you were right. There was another bug in directionalSearch(). Now i fixed it. Here is the newest version with weights, with search depth 4.
Ok, it plays much better now, congrats! :)
It does make some stupid moves every now and then, and I think it is because you are evaluating the number of pieces turned over at the max-depth instead of evaluating the whole board. Look at this example:
Move A allows the comp to turn over 20 pieces 5 moves down, but allows the human to turn over 40 pieces combined on moves 2 and 4.
Move B allows the comp to turn over 10 pieces 5 moves down, but allows the human to turn over a total of 3 pieces combined for moves 2 and 4.
Now obviously move B is better, but evaluating the number of pieces turned over at the max-depth will often times evaluate move A as better since 20 is greater than 10.
Now I know your algorithm is a little more complicated than that, but stuff like this will fall through the cracks now and then, and it only takes one stupid comp move for the human to take over.
Much more impressive now. It's beating me 50% of the time (out of 6 games) You still might want to fix the spelling errors and the spacing error with the status...see my attachment above.