Corin Anderson Eric Anderson Geoff Hulten Tessa Lau AI in FreeCiv Corin Anderson Eric Anderson Geoff Hulten Tessa Lau
Our Goals Don’t rely on AI’s authors’ knowledge of the game -- learn own strategies Apply “real” AI techniques
Our approach Create a controller for each game element (unit, city, region, army, …) Each controller uses some form of AI Planning, constraint satisfaction, heuristics Different controllers may use different techniques Organize controllers in a hierarchy
Controller hierarchy Master Controller Army Controller Region Controllers non-mil units? all units? only military units? City Controllers should cities boss units around? Unit Controllers
Jobs and tasks Corey Eric Tessa Geoff Army transport controller ; architectural glue Eric City controller ; controller / controller interface Tessa City worker allocation ; UI Geoff Master control -- top-level control
Defining the interface
Example: Settlers
Other examples of three-phase interface
City worker allocation Server-side suggestions are okay But what about maximizing global requirements? Global science, money And what about neighboring city interactions? Land square contention Constraint satisfaction ; integer programming
Army Controller Troop transportation -- a logistics problem Solutions attempted using planning LPSAT: Metric information, such as unit hitpoints, attack value, etc. TGP: Task duration, such as turns to move Showing promise, although some difficulties Really want LPSAT + TGP. Ideas??
Master Controller Approximate FreeCiv with a simpler game Regions Level of Development Level of Exploration Gross Terrain Features Armies Estimate of total offensive/defensive power Location
More Master Controller Simple Actions Armies Move to region (aggressively or passively) Regions - perform a number of actions equal to their development Grow (target region, can be itself or adjacent) Build Army (target to add the units to?) Explore (target region, can be itself or adjacent) Research Evaluation based on development & army size Perform state space search every N turns The effect actions can be hard-coded, learned across games, and/or tuned during the course of a game. The output of this is fed as suggestions into the region and army controllers, does this conform well enough to our suggested master/slave interface?