Skip to content

Action Details

Actions

In every step, an agent receives an observation and takes action in response to the observation. The agent can use any decision-making algorithm to make the choice of the action as long as the format of the action conforms with the prescribed format. In the base environment of Civrealm, an action is a tuple consisting of the type of actor, the index of the actor, and the name of the action, respectively. The type of actor specifies which type of actor the agent wants to control in this step. This type could be:

  • unit - The 'unit' actor handles many fine-grained operations. They can be categorized into three main types: engineering actions, which handle tasks like city construction, planting, mining, and more; movement actions, including moving, transportation, embarking, and so on; and military actions, such as attacking, fortifying, bribing, etc.
  • city - The 'city' actor develops and manages cities. Their actions include unit production, building construction, city worker assignment, and more.
  • dipl - The 'dipl' actor is in charge of diplomacy actions including trading technologies, negotiating ceasefires, forming alliances, etc.
  • gov - The 'gov' actor allows the agent to change the government type to gain corresponding political benefits, adjust tax rates to balance economic expansion and citizen happiness, etc.
  • tech - The 'tech' actor sets immediate or long-term goals for their technology research.

The index of the actor specifies which actor of the specified type the agent wants to control. The name of the action denotes the specific action the agent requires the specified actor to take. For instance, if the agent wants to let a unit whose index is 111 plant trees, the action will be of the format ('unit', 111, 'plant').

Note

The observations returned by the environment include the indexes of the actors who can take actions in this step and the names of their actions that are allowed to be taken in the current state.

For more details about the actions that each type of actor can take, please refer to the following tables.

Unit Actions

Action Class Action Description Parameter
ActGoto Go to a target tile the target tile
ActHutEnter Enter a hut in the target tile for random events
ActEmbark Embark on a target boat mooring in an ocean tile the target boat unit
ActDisembark Disembark from a target boat mooring in an ocean tile
ActUnloadUnit Unload all units carried by the transporter unit -
ActBoard Board a boat mooring in the city of the current tile
ActDeboard Deboard a boat mooring in the city of the current tile
ActFortify Fortify in the current tile
ActAttack Attack the unit in a target tile the target tile
ActSpyBribeUnit Bribe a unit of other players to join us the target unit
ActConquerCity Conquer a city belongs to other players the target city
ActSpySabotageCity Sabotage a city belongs to other players
ActSpyStealTech Steal technology from a city belongs to other players
ActMine Mine in the current tile -
ActIrrigation Irrigate in the current tile
ActBuildRoad Build road in the current tile
ActBuildRailRoad Build railroad in the current tile
ActPlant Plant trees in the current tile
ActBuildCity Build a city in the current tile
ActAirbase Build airbase in the current tile
ActFortress Build fortress in the current tile
ActTransform Transform the terrain of the current tile
ActPillage Pillage an infrastructure in the current tile
ActCultivate Cultivate the forest in the current tile into a plain
ActUpgrade Upgrade the unit
ActDisband Disband the unit itself to save cost
ActKeepActivity Keep the current activity in this turn
ActHomecity Set the unit's home city as the city in the current tile
ActJoinCity Join the city in the current tile (increase city population)
ActMarketplace Sell goods in the target city's marketplace the target city
ActInvestigateSpend Investigate a target city belongs to other players
ActEmbassyStay Establish embassy in a target city belongs to other players
ActTradeRoute Establish a trade route from the unit's home city to the target city

City Actions

Action Class Action Description Parameter
CityWorkTile Choose a working tile for city the target tile
CityUnworkTile Do not work on a tile
CityBuyProduction Buy building or unit -
CityChangeSpecialist Change the type of a specialist type of the target specialist
CitySellImprovement Sell a building the target building
CityChangeImprovementProduction Construct a building
CityChangeUnitProduction Produce a unit the target unit

Diplomacy Actions

Action Class Action Description Parameter
StartNegotiate Start a negotiation target player ID
StopNegotiate End a negotiation
AcceptTreaty Accept treaties
CancelTreaty Cancel a treaty
CancelVision Cancel sharing vision
AddClause Add a basic clause target player ID + target basic clause type
AddTradeTechClause Add a trading tech clause target player ID + giver ID + target technology ID
AddTradeGoldClause Add a trading gold clause target player ID + giver ID + how much gold
AddTradeCityClause Add a trading city clause target player ID + giver ID + target city ID
RemoveClause Remove a clause target player ID + parameters of the target clause

Government Actions

Action Class Action Description Parameter
ChangeGovernment Revolution the target Government ID
SetSciLuxTax Set rates of tax + science + luxury rates of tax + science + luxury

Technology Actions

Action Class Action Description Parameter
ActChooseResearchTech Set a current research goal the target technology ID
ActChooseResearchGoal Set a future research goal the target technology ID