Skip to content
Snippets Groups Projects
Commit 53a66690 authored by Sam Moore's avatar Sam Moore
Browse files

Fixed "forfax" sample AI

Forfax now plays a fairly mediocre game of Stratego
He usually beats the dummy AI. Usually. After a while.

Sometimes he gets stuck in a loop where he repeats the same moves over and over again.
Sometimes he attempts to move bombs or the flag (???)
He also never actually captures the flag; he just destroys all the enemy pieces before going into a loop.
This is probably due to the movement value being very low for moving over pieces that are likely to be bombs
And when all mobile pieces are destroyed, the remainder are seen to be likely to be bombs.

The segfault was caused by much stupidity involving a for loop in Board::ForgetPiece and the continue statement
Changed to a while loop to fix.

Since Forfax works (Although it plays pretty badly) I will probably move onto other things for a while.
parent 041c37d1
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment