Giter VIP home page Giter VIP logo

doom-mistral's Introduction

DOOM Mistral

This repository is home to the DOOM Mistral project, crafted during the CV Mistral Hackathon. Our team developed a deep learning model capable of playing DOOM through visual input alone, utilizing the ViZDoom engine, a prominent tool in visual reinforcement learning. We transformed each game frame into a 32x64 grid, representing game elements in each cell, enabling our model to interpret the game visually. For a glimpse into how the model views the game, refer to this video (note: contains strobing effects):

https://twitter.com/i/status/1772075251297550457

We generated training data by playing DOOM, then fine-tuned a LoRA model on Mistral-7B, achieving reasonable results. While not an expert, the model can navigate the map and engage enemies when they appear.

Post-training, the model's actions were integrated back into the game, adopting a simplified RL approach due to the hackathon's time constraints.

DOOM Mistral Visualization

Watch the model in action here:

https://twitter.com/i/status/1772166935410532709

You can find our Weights & Biases dashboard here.

Setting Up DOOM Mistral

To initialize, create a virtual environment and install the ViZDoom dependencies:

pip install -r requirements.txt

Rename .env.example to .env and input your FIREWORKS_API_KEY.

To start the game, execute:

python llm_game.py

Generating Training Data

Capture gameplay for training with: python user_game.py

Access the training dataset at HuggingFace ๐Ÿค—, download it, and place it in the root directory.

Upload your dataset to Fireworks.ai for model training:

firectl create dataset doom-mistral doom_mistral.jsonl

Model Training and Usage

Training settings are listed in train_settings.yaml. To train, use:

firectl create fine-tuning-job --settings-file train_settings.yaml --display-name "DOOM-Mistral"

Access the trained model on fireworks.ai, named doom-mistral.

To play the game with any LLM, modify model_id in line 16, then run: python llm_game.py

Understanding the Grid

  • E: Enemy
  • P: Player
  • B: Bullet
  • W: Wall
  • F: Floor
  • A: ArmorBonus
  • Z: Zombieman
  • H: HealthBonus
  • S: Stimpack

Star History Chart

Star History Chart

Licensing

ViZDoom's original code is under the MIT license. ZDoom incorporates various sources, each with distinct licensing.

doom-mistral's People

Contributors

anubhavashok avatar umuthopeyildirim avatar imgbotapp 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.