参数设置 - DailinH/MAgent GitHub Wiki

底层模型设置

game mode

默认为False。设置方式例如:cfg.set({"minimap_mode": True})

  • food_mode: dead agent will leave food in the map

  • turn_mode: has two more actions -- turn left and turn right

  • minimap_mode: add minimap into observation

    (见GridWorld.cc设置) 在minimap情形下,暂存视野范围内内容,暂存各group目前元素数量,然后各agent间共享信息

  • goal_mode: [deprecated!] every agent has a specific goal

  • large_map_mode:

  • mean_mode: [deprecated!]

register_agent_type

  • height: int, height of agent body
  • width: int, width of agent body
  • speed: float, maximum speed, i.e. the radius of move circle of the agent
  • hp: float, maximum health point of the agent
  • view_range: gw.CircleRange or gw.SectorRange (目前似乎不支持gw.SectorRange,训练结果差)
  • damage: float, attack damage(给对方造成的damage)
  • step_recover: float, step recover of health point (can be negative)
  • kill_supply: float, the hp gain when kill this type of agents
  • step_reward: float, reward get in every step
  • kill_reward: float, reward gain when kill this type of agent
  • dead_penalty: float, reward get when dead
  • attack_penalty: float, reward get when perform an attack (this is used to make agents do not attack blank grid)

默认模型配置

pursuit(追捕)

param:
predator prey
size 2*2 1*1
hp 1 1
speed 1 1.5
view_range 半径为5px 半径为4px
attack_range 半径为4px 半径为0px(无法attack)
attack_penalty -0.2
config:

python/magent/builtin/config/pursuit.py

forest(丛林)

param:
tiger deer
size 1*1 1*1
hp 10 5
speed 1 1
view_range 半径为4px 半径为1px
attack_range 半径为1px 半径为0px(无法attack)
kill_supply(????) 0 8
attack_penalty -0.1
step_reward 1
damage 3 0
step_recover -0.5 0.2
config:

python/magent/builtin/config/forest.py

double-attack(丛林II)

param:

基本同forest模型,两组tiger,一组deer

config:

python/magent/builtin/config/double_attack.py

battle(战争)

param:

两组 small 相互攻击

small
size 1*1
hp 10
speed 2
view_range radius=5px
attack_range radius=1.5px
damage 2
step_recover 0.1
step_reward -0.005
kill_reward 5
dead_penalty -0.1
attack_penalty -0.1
config:

python/magent/builtin/config/double_attack.py

⚠️ **GitHub.com Fallback** ⚠️