Skip to content

Add an action_script feature that updates multiple agent actions #174

@mariojerez

Description

@mariojerez

Currently, the framework that I've found VMAS offers for creating a rule-based policy for agents is to set the Agent's action_script parameter to a function that sets the action of a single agent in a world. This is useful when the agents are following simple heuristics, but it can be really computationally inefficient to use in when implementing more complicated rules such as applying Reynolds' boids forces. This is a flocking simulation where the direction of the force applied to each agent is determined by the relative positions and headings of neighboring agents. So it's more computationally efficient to compute the forces applied to all agents rather than repeatedly calculating which agents are neighbors of each other for every single agent. So maybe we could add an action_script parameter to the World entity itself which can be set to a function that takes no arguments and is responsible for setting the actions of all rule-based agents.

This isn't high-priority since it's easy to set actions of rule-based agents without this feature, but it may offer some guidance to users who want to program more complicated rules-based agents efficiently. I also get that VMAS is designed more for reinforcement learning agents, but I'm working on a scenario where RL agents interact with rules-based agents, so there is room for overlap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions