It brings me wondrous, nay copious quantities of pleasure bringing you the first of at least two parts…(maybe more if I can persuade Scott) in a series of articles from Scott DeMers, orchestration General of the sumptuous looking Hellenica: the Story of Greece …where development of the AI system and all manner of solo musings that have helped and hindered the journey from conception to its living, breathing form.
Without further ado here is his designer diary #5 which focuses upon the AI element of this game (and what could be more fitting for the halls of the BSoMT’s A Guest Knows Best?)
Scott DeMers, Hellenica: The Solitaire Story of Greece (Part One)
It has been a long time since I have published an entry to these designer diaries. However, it is for good reason. We have been hip deep in finalizing the game for publication and have been doing a ton of intensive playtesting. Happy to report some real success on both fronts and I think you, the future owners of Hellenica, will be very happy with the outcome.
One of the most asked-for topics about this game is its solo play and that will be the main focus of this diary entry. I am reversing the usual flow of RULES followed by PROCESS (how we got to those rules) for this diary. The reason is that, more than any part of the game, this was an evolution. So, let’s talk about the AI in Hellenica.
In this designer diary I may take a shortcut on an explanation for brevity sake. Should you notice a discrepancy between what I type here and later published versions, know that it is for the above reason, an unmet stretch goal, or some late stage fine tuning.
The goal of introducing AI to Hellenica was primarily to allow for less than 7 players to still have an epic experience. Over the course of the AI development, we realized that the AI played well… very well, so well that it gives human players a run for their money. In our playtests, games with 3 and 4 players have been won by the AI. As I was observing this happening, I realized that we were not far off from being able to include solo play.
Over time, we have developed some rules of engagement or mantras by which we developed the AI. We set the following guidelines in place:
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
There were others, but those were the major ones. Finding the balance across all of these has been a blast… and also a challenge. My background in AI helped.
Let’s talk about each of these in a bit more detail:
1. The AI can play one to many seats.
We started out thinking of the AI as playing a few seats in a primarily human game. However, as the AI developed, we quickly became aware that it could play many seats. Our playtests have included games with no humans in it at all and they have been successful. The point here is that the game must work for literally any number of human players.
2. Low downtime
A lot of effort has gone here. The time to process the AI players’ turns needs to be minimal. We call this the “Humans first” rule. AI Players are a single card flip and a quick review of the board. The aggressive goal is that the AI Player’s turn is less than 1 minute.
3. Low bookkeeping
This goal dovetails with the low downtime goal. Bluntly put, no one (playing games) wants to be an accountant. The AI needs to not be fiddly. There needs to be a minimum of counters and markers and such. This required some real balance between what you place on the board and what you may track more abstractly.
4. AI can win the game
AI needs to be a real threat to win the game outright. Otherwise, what is the point of playing solo, right? More accurately stated, the AI can the game using the actual rules of the game. AI can win the game whether the AI is playing 1 city-state or 6 city-states against a solo player. Ambitious goal, but I am quite happy here.
5. AI follows the rules (wherever possible)
Any of you old timers out there remember the video game, “Civilization II” by Sid Meier? The game played (largely) by the rules. There was one glaring omission, however. In the game it required a LOT of memory to calculate path finding for unit movement. Triremes in the game could not end their turn away from land. However, there was not an efficient way to calculate complex paths with available memory at the time, so the publishers simply scrapped that rule for the computer players. It resulted in the computer players being able to expand much more quickly than human players. Still a great game, but I wanted no “magic trireme” rules in Hellenica.
6. It needs to be fun
Playing with an AI player needs to be something that players welcome. It should not be burdensome. It should be cool. It should not feel like reading a flowchart or text book. A player should not need a PHD to use the AI in the game. These various goals listed above are interconnected – they have dependencies. They also conflict at times. When they conflict, the number one goal is that it should be fast and fun. Nothing else matters if it is not that.
During a turn, the AI Player may take all the same actions that players may take. They can research advancements, worship the gods, bid on world events, implement their effects, move units, etc. How do they do it and how can this be done quickly and easily? Let’s explore it.
AI Player Actions
As you may know from prior designer diaries, a turn consists of multiple rounds. During each round a player takes individual actions. Those actions are train (units), build (city upgrades), research (advancements), worship (the gods), and supply (for commerce or movement).
The AI Players do the exact same thing. However, they take all of their non-movement actions at once on the first round of each turn. This is a simple compromise to ensure that bookkeeping is kept to a minimum. Production for an AI Player is determined by the flip of an AI card (currently called a Pericles card, but that may change). A Pericles card looks as follows (Literally no art or layout work has been done on this image – not final).
Each card’s title refers to its general focus and then lists the “things” that the AI has gained. In this particular case, it if it prior to turn 4, the AI Player would receive 1 advancement (research action), 1 favor (worship action), 1 commerce, and a trireme is placed in its home city. In addition, it receives enough supplies to move units from 1 tile during this turn. If it were turn 4 or later, it would receive an additional favor, no commerce, 3 elite triremes and would be able to move 2 stacks of units during the turn.
As I said, bookkeeping is kept to a minimum. Commodities in the top gray area of the AI card are tracked on a single AI board for all AI Players using 8mm cubes. The units are placed on the map. The supply information is tracked on the AI Board with cubes as well. Below is an image of the AI Board (again, no art or layout work has been done to this image – not final).
So, the AI’s entire turn of “production” is a card flip, placing a few units on the map and moving a few cubes on the AI Board. Easy. Quick. Low hassle.
One key to the AI Player playing well is what it produces using these card flips. They are balanced to ensure that he AI Player keeps pace, and sometimes outpaces, the human players. If one AI Player flips cards that build lots of units on successive turns, watch out! The AI player WILL get aggressive. But they can also build more advancements than you or have more favor with the gods, etc. if the card flips dictate that.
The second part of the turn is the AI Player’s movement. The supply number on the very bottom of the Pericles cards determine how many times the AI Player will move in the turn. Each round the AI Player may move one time (which is the same as a human player).
AI Player movement is simply this: If the supply number for that player is higher than 0, look for the biggest stack of units the AI player has on the map and move it (I will explain where it moves in just a moment). Then, decrement the supply number. Again, easy. Quick. Low hassle.
Note that this movement occurs every round until the supply number for that AI Player reaches 0 whereas the card flip only occurs on the first round each turn.
Where are we going?
The key to the AI player playing a good game is in the combination of what it builds (covered earlier) and how it moves. AI moves on both sea and land. The AI Player can make use of all types of movement that players can use.
To know where the AI is going to move is to apply a simple hierarchy until a single tile is identified. Note that this is still undergoing final tweaking and may change between now and publication).
Step 1 is to move to tiles containing the least friendly units. Thus, if adjacent to 4 tiles and only 1 of them has no friendly units on it, this is where the AI Player will move those units. However, if more than 1 tile meets the criteria, you continue to step 2.
Step 2 is whether one of the matching tiles is an objective to win the game? – if so, that is pretty critical and the AI will move to capture it. If not, then continue…
Step 3 is does the AI Player have a grudge against an adjacent player (more on that in a moment).
Step 4 is to the most valuable city available for capture.
Step 5 is a tile containing another player’s units.
And finally step 6, if there is still more than 1 matching tile, is to determine the target tile randomly from the remaining matching tiles.
Again, easy. Quick. No hassle.
Each round the AI Players will often expand, and then fight to hold that expanded territory. This is repeated round after round, turn after turn.
The AI is a system + cards. It is not an actual computer program with memory, etc. So, one simple thing we added to the game is the concept of a grudge. If a player, human or AI, moves into a tile occupied by an AI Player, casts an invocation against them, or causes a World Event to harm them, a cube of the player’s color is placed in the “grudge space” of that AI Player. That AI Player will favor harming their grudge player more than any other when possible (step 3 of movement targeting). Should another player later do something harmful to the AI Player, the cube in the grudge space is replaced. Thus, with a simple, easy mechanic, the AI Player will “remember” past slights and act on them.
Winning Hellenica is discussed in a prior designer diary and I will not rehash it here. For the AI Player, instead of having 2 “hidden” objectives, the AI Players all share 3 objectives flipped face up next to the game board in addition to the other 3 public objectives that all players share.
The AI player wins by completing any 3 of the 6 face up objectives, with at least 1 of them being a public goal shared by all players. This simple rule modification makes up for the fact that the AI does not consciously know the goals it is trying to accomplish.
I have not covered some of the more ancillary items for the AI play, such as world events bids, etc.. Suffice it to say that the AI will bid on world events. The AI will hoard favor or philosophers or race you on advancements. It plays a competitive game.
It also fights against other AI Players. The AI sees all players as threats and treats an AI player no different than a human Player. Each AI Player plays independent of the other AI Players and wins individually.
An AI Athens may harbor a grudge against an AI Troy thus allowing a human Sparta to back stab. Or an AI Player may take advantage of a another player that has survived an onslaught, albeit in a weakened state. All of this is within the realm of possibility for the AI as designed.
I do not know how many more designer diaries I will have time to write here. Hopefully, I will. However, it is April as I write this and the KS is currently planned for late May or June. Those dates are subject to change.
If you found this valuable or have a question, please give it a share, a like or a comment. If you did not, drop me a PM so I can find a way to make these entries more valuable for you.
Thanks for reading and may Athena fill you with wisdom.
Hellenica BGG page: https://www.boardgamegeek.com/boardgame/217576/hellenica-story-greece
Footnote from Scott: The game can play as many of the city-states as you wish. Heck, our playtests have included 7 AI players playing against each other. If I am exposing my inner-geek, it is wickedly fun to watch, frankly.
Whether you work with the other players or not is up to you. Do you get along with your usual gamers?