Skip to content

stillonearth/bevy_rl_shooter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👾Multi-Agent 🎮 FPS Gym Environment with 🏋️ bevy_rl

Crates.io MIT/Apache 2.0 Crates.io Rust

app.2022-09-27.04-13-58.mp4

Project Description

This is a basic multi-agent gym environment for bevy_rl. It is a deathmatch free-for-all environment where agents spawn as red spheres and get +10 reward on kill. The environment is implemented in Rust using bevy game engine and bevy_rl plugin.

It implements very basics of a multi-agent environment. It is a good starting point for creating more complex environments.

  • Random initialization of agents
  • REST API for controlling agents (including state, reward and camera pixels)
  • REST API to reset an environment

You can wrap the environment with a python wrapper and use it with OpenAI Gym interface. (example in python/bevy_rl_rest_api.ipynb)

Environment Description

  • 16 agents spawn in a random position
  • Agents can move and rotate
  • Environment pauses every 0.1 second to fetch control commands from REST API
  • Reward: +10 on kill

Usage

  • follow bevy's setup guide to set up Rust
  • build an environment with cargo build +nightly --release;
  • run environment with ./target/release/bevy_rl_shooter --mode train
  • python/env.py implements a python wrapper for an environment
  • python/bevy_rl_rest_api.ipynb illustrates how to use the wrapper

About

Multi-Agent FPS Gym Environment with bevy_rl

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published