This week I have been working on improving my code dealing with retreat. Since this is a common feature of war games I thought I had better make it work better than I presently have.
There are several problems I am battling (no pun intended!) with at the moment.
Take a look at the below scenario
Here the Russian 167 Rifle Division (Center of the screen) is required to retreat 3 hexes. Possible final retreat hexes are marked with the yellow outlines.
So the problems I am wrestling with:
- Do I let a human player choose the hex they can retreat to? This, of course, would be the norm in a board game. Not so common in PC war games.
- What about the AI? How can I replicate how a human would choose the final retreat hex?
- If I really can’t replicate how a human player would choose then is it fair in the game to give the human player a possible advantage over the AI?
- Do game players even want this level of control?
- Should a 2 player game allow players to choose retreat hexes but not when playing against the computer?
- What about PBEM? I cannot expect the players to email every battle when there is a retreat decision needed by the opposing player.
With Kursk – Battle at Prochorovka I let the computer decide on a random retreat hex with little real thought on how it decided which one to pick.
My current thinking is I will let the computer control the final retreat location but I will try to give more reasoning to the final location by for example looking at things like:
- Does the final retreat hex help maintain the front line
- Is it a hex with defensive benefits
- Is the retreat hex in supply
- Are other friendly units nearby
So I will give each Hex a value and then the one with the highest score becomes the choice.
I will also backport these improvements into Kursk – Battle at Prochorovka so that players of that game benefit from the things I learn/improve as I develop more games.