Skip to content

Record more statistics #155

@liqimai

Description

@liqimai

I notice that there is an env.state.stats variable to record some game statistics. This is exactly what we RL trainers need. During these days' training, I really want to visualize some statistics about the gameplay, but most statistics are not easy to get outside env.step, because env.step is the actual place where the game logic runs. Here are some statistics I suggest recording.

Suggested statistics

Resource production statistics

  • ore dug so far by light/heavy
  • ice dug so far by light/heavy
  • water/metal refined so far
  • power generated so far by
    • factory
    • light robots
    • heavy robots

Resource consumption statistics

  • water spent on
    • watering
    • keeping factories alive
  • metal spent on
    • building light robots
    • building heavy robots
  • power spent on each action type, including
    • move/dig/self_destruct
    • updating action queue
    • building light/heavy robots

Action statistics

  • the successfully executed number of each action type
  • for dig
    • rubble removed so far by light/heavy
    • own/opponent lichen dug so far by light/heavy
  • for pickup
    • the total amount of each type of resource picked by light/heavy
  • for transfer
    • for each resource type
      • amount transferred from light/heavy
      • amount transferred to light/heavy/factory
  • for move
    • average rubble in the target tile of light/heavy
    • the number of collisions with own/opponent robots
    • survival light/heavy in collisions
    • destroyed light/heavy in collisions

To be continued

Other proposals are welcome. Please leave a comment if you want other statistics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestenvironmentdevelopment related to the environment

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions