Skip to content

Action and Behaviors

fhtanaka edited this page Oct 7, 2022 · 1 revision

Action is a command that changes the agent's attribute/state. A behavior is a collection of actions that a agent can perform in certain situations.

Actions are described in the behavior.csv files, usually in config/[situation]/behavior/behavior.csv

Action itself consist of 5 different types:

  • Wait
  • Move
  • Modify Attribute
  • Create Attribute
  • Delete Attribute

Wait

Wait is an action where the agent wait at their current position.

Example of this action can be written as:

  • "wait:30" = wait 30 seconds
  • "wait:30(minutes)" = wait 30 minutes
  • "wait:3(h)" = wait 3 hours
  • "wait:30(m)-1(hour)" = wait around 30 to 60 minutes
  • "wait:$eat_duration(minutes)" = wait based on the agent's "eat_duration" attribute in minutes format

supported type:

  • seconds = ["s","sec","secs","second","seconds"]
  • minutes = ["m","min","mins","minute","minutes"]
  • hours = ["h","hou","hour","hours"]
  • days = ["d","day","days"]
  • weeks = ["w","week","weeks"]

Move

Move is an action that changes the agent position progressively.

Example of this action can be written as:

  • "move:hospital" = the agent will move to a randomly selected hospital
  • "move:1234(id)" = the agent will move to a place with id = 1234
  • "move:restaurant(type)" = the agent will a randomly selected restaurant
  • "move:$workplace(id)" = the agent will move to a place with id defined in their "workplace" attribute
  • "move:$favorite_restaurant_type(type)" = the agent will move to a place with type defined in their "favorite_restaurant_type" attribute

supported type:

  • id = ["id","destination_id"]
  • type = ["type","destination_type"]