Hellenica: The Solitaire Story of Greece Part two:

It is an interesting dilemma, I have often thought, trying to automate movement in a boardgame…to emulate human thought process and evaluation of situations that arise throughout a game…without it ever becoming an overbearing series of logic flowcharts and heavy book keeping. Streamlining and simplifying yet remaining competitive and challenging must have proven as difficult, if not more difficult, than conceiving a game  itself.

Such is the peril that face the implementation of an artificial Greek intelligence for Hellenica. Scott asked me to check his article and see if anything required editing. I can’t see anything that needs to be edited, butchered or further reshuffled so without further ado it brings me enormous pleasure and, is in fact, a great honour, to bring you part two of Scott DeMers inciteful musings on the development of the AI system for Hellenica.

 

On Designing for Solo Gaming…by Scott DeMers

When designing a game with solo play, a designer must determine what is the goal of the AI. Is it to win? Is it to play as if it were human? Is it to challenge the players, but not win? Is it to follow the rules? Is it to emphasize detailed play over time to play? And more. These are interesting questions.

In my upcoming design, Hellenica: Story of Greece, I looked at a variety of factors that I felt were important guideposts for the design. These are discussed in detail in a previous post, but I will repeat the summary of them here to save time.

1. The AI can play anywhere from one to many seats.

2. Low downtime

3. Low bookkeeping

4. AI can win the game

5. AI follows the rules (wherever possible)

6. It needs to be fun

Why are these important? Well, for one, a designer constantly faces pressures to tweak the game to be better. That is normal. When making these decisions, having these principles in place to guide you can keep the focus on the experience you want to deliver. I thought it would be interesting to look at one of the big experiences I had from Hellenica and show how the above items guided the finished product coming to Kickstarter this Summer.

The item I will discuss below are the trials and tribulations of getting the AI movement rules just right.

FIRST ATTEMPT: KEEP IT SIMPLE STUPID

I chose early on to use a card-based system for determining the AI actions. This seemed logical – the AI would reveal a card, place their city upgrades, units, and commodities.

I added to these rules that the AI would then do all movement on the first action round of a turn. Very efficient and FAST (Guidelines #2 and #3 above).

To account for AI players reacting to the moves of the human players coming later in the turn, I put in a “reaction move” concept. The premise was simple: AI players would act as if all adjacent areas belonged to them. They would consider any movement into an adjacent space a transgression by the other player and the AI would receive a free move to attack the player that had just moved. This meant that the AI could move units more than human players, even on the first turn (clear violation of #5 above). Hmmm, already running into conflict between the guidelines.

Our first playtest of this was a game with 6 humans and 1 AI player (Corcyra in the upper left corner of the map). With the AI player taking their entire turn at once, the human players nearby were at a disadvantage. Corcyra proceeded to move all of its units Southeast on turn 1 leaving them only 1 space away from Corinth. Corinth was in a pickle, since Corcyra now considered this space adjacent to Corinth’s starting space to be theirs. All of this happened before Corinth had taken a single action.

This clearly violated principle #5, AI follows the rules. It also violated #6 it needs to be fun (It was not, at least not for Corinth, though some of the other players found it amusing). Corinth spent his game building units in his home city to defend against the Corcyran hordes; only occasionally sneaking a unit out the other side of his home city-state. He was neutered early. Not fun and, frankly, it changed the way a human player plays the game. That is not what I wanted.

SECOND ATTEMPT: TOO STUBBORN TO OVERHAUL

The primary change I made to the AI movement rules was a tweak and not a redo. I added a condition to the reaction move. The AI would only attack if it had a stronger force (determined by number of units or combat strength). I will admit that this was better, in that it allowed a player to intimidate the AI players into not attacking. However, it did not solve the core dilemma. The AI still had the ability to cheat and changed the way human players played the game.

The feedback was given to me as, “The AI is overpowered”. And they were right – and not in an elegant way. The AI, because of its ability to cheat, could steamroll a player based on brute strength.

SEVENTH ATTEMPT: FOLLOW THE PRINCIPLES

Wait, where did THIRD, FOURTH, FIFTH, and SIXTH ATTEMPTS go? Suffice it to say that I can be hard headed. I made numerous attempts to make the reaction moves work before I finally threw in the towel and returned to my principles.

Reaction moves were OP. They also violated clear rules of the game. I removed them.

In place of reaction moves, the rules said that the AI would move units out of any tile that contained 4 or more units, one stack per round. Thus, the AI would move more like a player, but without any limitations. It is worth noting here that players can only move as many stacks as they have Markets in play to supply those areas for movement. The AI Players do not track Markets on the map and so they had no limits to the number of times they could move.

I also added to the rules that the AI was “looking for a fight” and would target enemy units whenever possible. It seemed logical and I was pleased.

I called together the same 6 people who had played attempt #1 and placed an AI player in Corcyra confident that it would play a compelling game and fair game.

All went well… really well… until about the 4th or 5th turn when Corcyra happened to string together a move from Corcyra into Thebes on a single turn. The AI had 3 units in each of the areas between Corcyra and Thebes and received a few more from the AI card they revealed. They then proceeded to move all of the units in Corcyra to the adjacent space. On the next round, they moved THOSE units to the next space towards Thebes. And the next round, and the next round until voila, the magic Hoplites had moved all the way from Corcyra to Thebes.

Thankfully, the Theban player laughed though still not sure if it was with me or at me.

The thing I had violated was again principle #5, but this time, inadvertently. Why? Because I was loathe to violate principle #3 – low bookkeeping. Keeping track of unit movement – who had and who had not – is not easy and might be perceived as a headache.

EIGHTH ATTEMPT: SUPPLY LIMITS   

I made two main changes and they are (largely) the system that you will see in the released game.

1)      I added the concept of supply limits such that the AI player can never move more than a human player can. Supply limits are shown on the AI card that is flipped on round 1 of a turn. It shows a number representing how many times the AI can move during this turn. In this way, I satisfied both #5 and #3. How? When a player flips a card, they place the colored cube for that AI player on the supply limit number shown. Each time the AI player moves in a round, the cube is moved 1 space lower. When it is at 0, the AI player may no longer move. EASY!

2)      Further ensuring that the AI player would not cheat, I changed the flow. No more receiving and moving everything in a single round. On round 1 of a turn, the AI player receives units. On Round 2 and beyond, the AI player receives no additional units, but will move its largest remaining stack of units to an adjacent area. Each round simply look for the largest stack of units and determine where it should move.

The combination of these two edits meant that the AI never moved more than 1 space in a round (just like a human player) and that they would have a limited supply (just like a human player).

It worked. It worked really well. This is (largely) the system that you will see in the game later this Summer (I further tweaked a timing or two, but will leave that for when the official rules are released.

SUMMARY

To me, it just shows that staying true to your core principles that you defined up front is key to successful design – I did not, and that is when I got in to trouble. The AI was developed over a 6 month period. How much shorter could that have been if I had kept my principles in mind?

Does the AI in Hellenica: Story of Greece play a perfect game? No, but then neither do humans. I am sure I will be told of examples where the AI made a dumb move and allowed a human player to capture something or even win. I also think I will be hearing about the AI outwitting a human player as well. I assure you I will relish the latter more than wince at the former.

Have a question, don’t hesitate to hit me up on Boardgamegeek. Take care all and game on!

Hellenica: Story of Greece can be found here on Boardgamegeek (https://boardgamegeek.com/boardgame/217576/hellenica-story-greece).

Scott DeMers

6/28/2018

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s