1 Reply
      Latest reply on Apr 15, 2019 10:59 PM by SandiM
      SandiM Level 1 Level 1 (0 points)

        Hi all,


        I am working on a two-player strategy board game with the option to play against CPU and I am using the GKMinmaxStrategist to give some brains to the CPU player.


        Just for background, there are two "factions" in the game (King, Enemy) and the one playing King always starts. Now, I have managed to implement the strategist and it works if I play King against the CPU and make the first move. However, when I play as Enemy and the CPU has to make the first move (playing as King), it doesn't work strangely enough. It appears that, after invoking the strategist's bestMove method, it doesn't call any of the underlying simulation methods, like isWin, apply, score, etc.


        I have tried changing the rules so that the Enemy always starts, but again it didn't work, whereas it did spit out moves for the Enemy when I played as King and made the first move (as mentioned above).


        So this first move, no matter for which faction seems to be the issue and I can't work out why that would be the case.


        Has anyone experienced a similar issue or does anyone have any bright ideas as to why this might be the case?


        Any help would be much appreciated.