Friday, December 16, 2016

Empire Postmortem Post

My AI has been though some massive changes. The original idea for my AI was to have different groups of units to perform specific actions. The behaviors were attack, defend and wander.

After trying to get my AI to work with little success. I rethought my whole approach. In the game the player gets points from owning cities and having units created. In the game units can't be on the same tile, unless the tile is a city. Using all this knowledge I devised a new algorithm to play Empire. My new strategy is to sit in the city and keep making armies as fast as possible. Armies are the quickest unit to make, so I will get more points for only making them. Armies will only venture out from the city to attack enemies units next to the city.

The day of the competition, my algorithm  was disappointing in the competition. There were bugs in my code during the competition. In the first game I lost because my first unit moved to a water tile. When I tested the AI, the army unit would move to a land tile. This broke my strategy because the storms at sea wiped out my units.  Then I lost in the first round of the loser's bracket because my AI isn't fast enough to win in a match with 3 people. It thrives on 4 people trying to take out each other.