PressurePlate is a multi-agent environment that requires agents to cooperate during the traversal of a gridworld.

Overview

Maintenance GitHub license

Four Agent, Linear Layout

Description

PressurePlate is a multi-agent environment that requires agents to cooperate during the traversal of a gridworld. The grid is partitioned into several rooms, and each room contains a plate and a closed doorway. Before episodes begin, each agent is assigned a plate that only they can activate. For the group of agents to proceed into the next room, an agent must remain behind, standing on their assigned plate. The task is considered solved when the goal (depicted with a treasure chest) is reached.

Currently, PressurePlate supports four-, five-, and six-player levels but is easily configurable for custom scenarios. See Customizing Scenarios for more information.

Observation Space

Each agent has a distance-limited view of the environment, as defined by the sensor_range attribute of the PressurePlate class. The PressurePlate world is made of several 2D grids, where each grid corresponds to an entity type. For example, one grid corresponds to walls, one grid corresponds to plates, and so on. When queried, the environment produces a subsection of each grid that corresponds to each agent's viewing range. Next, these subsections are flattened and concatenated together. Finally, the agent's (x,y) coordinates are concatenated to the end of the observation vector.

See the below figure for a depiction of this process for Agent 0 and the Doors grid.

Action Space

PressurePlate's action space is discrete and has five options: up, down, left, right, and no-op (do nothing).

For each call of .step(), the ordering of action-execution is randomized.

Reward Function

Each agent receives rewards independent of other agents. If an agent is in the room that contains their assigned plate, their reward is the negative normalized Manhattan distance between their current position and the plate. Otherwise, their reward is the number of rooms between their current room and the room that contains their assigned plate.

Installation

After cloning the repo, cd into pressureplate and:

pip install -e .

Using PressurePlate

Within your Python script, access the three currently-available tasks as follows:

env = gym.make('pressureplate-linear-4p-v0')
env = gym.make('pressureplate-linear-5p-v0')
env = gym.make('pressureplate-linear-6p-v0')

The PressurePlate environment is implemented within the Gym paradigm, and therefore uses the usual .step(), .reset(), and .render() methods.

Customizing Scenarios

To create a custom PressurePlate layout, you can add a layout dictionary to the pressureplate/assets.py file. The dictionary must contain lists of (x,y) coordinates of the following elements:

  • A unique identifier (e.g., 'FOUR_PLAYERS')
  • 'WALLS'
  • 'DOORS'
  • 'PLATES'
  • 'AGENTS'
  • 'GOAL'

Additionally, you will need to register the new task as a gym environment within pressureplate/__init__.py. Finally, edit the PressurePlate class with pressureplate/environment.py to load your custom layout into the self.layout attribute.

For detailed instructions, please refer to the docstring within pressureplate/assets.py.

Owner
Autonomous Agents Research Group (University of Edinburgh)
Official code repositories for projects by the Autonomous Agents Research Group
Autonomous Agents Research Group (University of Edinburgh)
An application for automation of the mining function in the game Alienworlds.IO

alienautomation A Python script made to automate the tidious job of mining on AlienWorlds This script: Automatically opens the browser Automatically l

anonieXdev 42 Dec 03, 2022
Hartree-Fock Workshop for the Han-sur-Lesse Winterschool of 2021

Hartree-Fock course for the Han-sur-Lesse Winterschool of 2021 Requirements For going through these exercises, please install the Anaconda suite. Next

Ivo Filot 2 Nov 16, 2022
A comprensive software collection for nmea manipulation

nmeatoolkit A comprensive software collection for nmea manipulation; it includes a library and a collections of command line tools. Library pipes: con

Davide Gessa 1 Sep 14, 2022
An esoteric programming language that supports concurrency, regex, and web requests.

The Hofstadter Esoteric Programming Language Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's La

Austin Henley 19 Dec 27, 2022
A basic layout of atm working of my local database

Software for working Banking service πŸ˜„ This project was developed for Banking service. mysql server is required To have mysql server on your system u

satya 1 Oct 21, 2021
Mmr image postbot - Π‘ΠΎΡ‚ для создания ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠΉ с Π½ΠΎΠ²Ρ‹ΠΌΠΈ Ρ€Π΅Π»ΠΈΠ·Π°ΠΌΠΈ Π² сообщСство Π’Πš MMR Aggregator

Mmr image postbot - Π‘ΠΎΡ‚ для создания ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠΉ с Π½ΠΎΠ²Ρ‹ΠΌΠΈ Ρ€Π΅Π»ΠΈΠ·Π°ΠΌΠΈ Π² сообщСство Π’Πš MMR Aggregator

Max 3 Jan 07, 2022
Audio-analytics for music-producers! Automate tedious tasks such as musical scale detection, BPM rate classification and audio file conversion.

Click here to be re-directed to the Beat Inspect Streamlit Web-App You are a music producer? Let's get in touch via LinkedIn Fundamental Analytics for

Stefan Rummer 11 Dec 27, 2022
Python implementation for Active Directory certificate abuse

Certipy is a Python tool to enumerate and abuse misconfigurations in Active Directory Certificate Services (AD CS). Based on the C# variant Ce

Oliver Lyak 1.3k Jan 09, 2023
A collection of examples of using cocotb for functional verification of VHDL designs with GHDL.

At the moment, this repo is in an early state and serves as a learning tool for me. So it contains a a lot of quirks and code which can be done much better by cocotb-professionals.

T. Meissner 7 Mar 10, 2022
A module that can manage you're gtps

Growtopia Private Server Controler Module For Controle Your GTPS | Build in Python3 Creator Information

iFanpS 6 Jan 14, 2022
This module extends twarc to allow you to print out tweets as text for easy testing on the command line

twarc-text This module extends twarc to allow you to print out tweets as text for easy testing on the command line. Maybe it's useful for spot checkin

Documenting the Now 2 Oct 12, 2021
Reactjs web app written entirely in python, using transcrypt compiler.

Reactjs web app written entirely in python, using transcrypt compiler.

Dan Shai 22 Nov 27, 2022
Python script that automates the tasks involved in starting a new coding project

Auto Project Builder Automates the repetitive tasks while starting a new project Installation Use the REQUIREMENTS.txt file to install the dependencie

Prathap S S 1 Feb 03, 2022
TinyBar - Tiny MacOS menu bar utility to track price dynamics for assets on TinyMan.org

πŸ“ƒ About A simple MacOS menu bar app to display current coins from most popular

Al 8 Dec 23, 2022
Hotpile: High Order Turing Machine Language Compiler

Hotpile: High Order Turing Machine Language Compiler Build and Run Requirements: Python 3.6+, bison, flex, and GCC installed. Needs to be run under UN

Jiang Weihao 4 Dec 29, 2021
Find virtual hosts (vhosts) from IP addresses and hostnames

Features Enumerate vhosts from a list of IP addresses and domain names. Virtual Hosts are enumerated using the following process: Supplied domains are

3 Jul 09, 2022
GWAS summary statistics files QC tool

SSrehab dependencies: python 3.8+ a GNU/Linux with bash v4 or 5. python packages in requirements.txt bcftools (only for prepare_dbSNPs) gz-sort (only

21 Nov 02, 2022
Web App for University Project

University Project About I made this web app to finish a project assigned by my teacher. It is written entirely in Python, thanks to streamlit to make

15 Nov 27, 2022
Mannaggia is a python application to praise or more likely to curse the saints

Mannaggia-py πŸ‘Ό Remember Mannaggia? This is a Python remake of it, with new features. mannaggia is a python application to praise or more likely to cu

Christian Visintin 9 Aug 12, 2022
An advanced pencil sketch generator

Pencilate An advanced pencil sketch generator About : An advanced pencil sketch maker made in just 12 lines of code. Yes you read it right, JUST 12 LI

MAINAK CHAUDHURI 23 Dec 17, 2022