GithubHelp home page GithubHelp logo

gpt-world's Introduction

🌎GPTWorld: An Experimental AI-engined Sandbox World

Screenshot

NOTE: We are now integrated into AgentVerse!

🌎GPTWorld is an experimental multi-agent sandbox world. Unlike typical sandbox games, interactions in GPTWorld are not fully defined by pre-written scripts 📜 and rules📏, but rather inferred by a world engine based on large models 🤖. In this world, the whole environment, including agents and objects, is supported by large models, providing great autonomy and diversity.

The creation of a sandbox world is often considered to require advanced game development techniques that are beyond the reach of most individuals. This is where 🌎GPTWorld comes to the rescue! 🛠️ Our goal is to make the process of creating a diverse range of sandboxes more accessible by enabling players to construct custom worlds using simple configuration files or even natural language 🤩.

Through this easy-to-use world creation feature, we hope to inspire everyone to construct their own unique worlds. As a result, a vibrant sandbox environment community will emerge, allowing intelligent agents to explore various creations through community sharing 🤝.

👨‍💻👩‍💻 Join us on this exciting journey of creating a groundbreaking sandbox world with limitless possibilities 🚀!

Project Status

1. Currently, 🌍GPTWorld Supports:

👨‍💻 Create with JSON: Easily creating your environment and entities using JSON and mounting them onto your world

🏃 Start World Engine: Starting the environment's autonomous operation with just one command.

👀 Demo: Observing the behavior of the agent in your web browser.

2. Experimental Feature

🗣️ Create with NL: Creating environments with natural languages.

3. TODOS!

❗️ Polishing: Feeling that the current behavior of agents is not very reasonable? Don't worry, we are improving it!

❗️ Refactoring: We are also using AgentVerse to refactor the behavior of agents!

🤝 Distributed: Allowing players to build and share environments in a distributed way.

Usage

Installation

We strongly recommend to use python=3.8 on all platforms.

  1. Download project by
git clone https://github.com/ShengdingHu/GPT-World.git
  1. (Optional) Create a python virtual enviornment by
conda create -n gptworld python=3.8
  • Please note that Python 3.8 provides the best support for flask-socketio, whereas other versions of Python may currently encounter issues with web display. *
  1. Go to project directory by
cd GPT-World
  1. Install dependencies by
pip install -r requirements.txt
  1. Then install this library by
pip install .
  1. Build the front end
cd io/frontend/rpg-game/
npm install
npm run build

Run Examples

We currently provide some example sandboxes in world_instances/, choose one that you want to launch. Take alice_home as an example.

  1. start the world engine
python gptworld/run.py -W alice_home
  1. start the web server
python io/app.py -W alice_home

now open the 5001 port of your localhost(http://0.0.0.0:5001/), and you will be able to see a wonderful environment full of GPT-drived agents and objects!

If http://0.0.0.0:5001/ is not working, you may try http://127.0.0.1:5001/.

(🧪Experimental) Create Your Own World

If you want to create your world instance, run gptworld/create_world.py -W <world_instance> -I <info>, where <world_instance> stands for the name of the world directory in the ./world_instances/ directory, and <info> stands for the initial information about the world to be created. Remember to add specific information into the <info> argument, the more detailed, the better.

e.g. -W neighborhood -I "A neighborhood with some Chinese restaurants (with a cook, tables, chairs, delicious foods), and coffee bar (coffee machine, coffee staff), 711 shop (stocks, drinks, snacks, etc), trees, grass area (with flower, old people, etc), roads (with some cars, bikes), Alice's house and Bob's house (includes some furniture , like sofa, bed, bookshelf, cooker, and their families, a yard with two apple trees, etc), all above should be areas, each task could be a subtask, assign the jobs with lots of details, no overlapping areas. Add some people and animals and plants, evenly distributed. Expect more details. Areas should not overlap with each other."

Global Configs

  1. Log Level:
export GPTWORLD_LOG_LEVEL=<log_level>

<log_level> can be DEBUG, INFO, WARNING ...) to set the logging level, DEBUG will have a lot of print in command line :

  1. OpenAI Key
export OPENAI_API_KEY=<your_openai_api_key>

<your_openai_api_key> refers to your own api key to access to the ChatGPT.

In Windows OS, please add environment variables instead of export methods.

🙏Acknowledgements

This project was greatly inspired by Generative Agents: Interactive Simulacra of Human Behavior during development, where the mechanism of agents' behavior takes the reflection-summary-plan framework.

🚨 Disclaimer:

This project is for academic and experimental purposes only. We currently suspect that it is far from a usable game product.

Contributor

Made with contrib.rocks.

gpt-world's People

Contributors

bokesyo avatar dr-left avatar hirasawaayui avatar shengdinghu avatar zefanw avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.