Skip to content

scottstts/LMCS

Repository files navigation

LLMs playing shooting game

This is a 3v3 shooting game, there are two opposing teams (blue and orange), each has 3 units at the beginning of the game.

Each team is controlled by an LLM. You can let two LLMs playing the game as two teams and render the saved gameplay data in the React renderer.

Gameplay

How to use

  1. Set up your .env file as shown by .env.example. Inside you can choose different LLM with different configs to play each team
  2. Run npm run llm-game to let the two LLMs play the game (this will take a while, the game simulation runs headlessly and saves gameplay data for every game tick)
  3. After game finishes, the gameplay json data is saved in playback/ dir
  4. Run npm run dev to spin up the React renderer
  5. In the panel, under "Inference" tab, click "Load Recording", selected the saved playback json file, and click "Start"
  6. The gameplay between the two LLMs will be rendered in the 3D game scene

For LLMs running locally in LM Studio:

  • Set up configs for local models in .env
  • lms load <model_id> -- load the model
  • lms server start -- start server (default running on port 1234)
  • npm run llm-game -- start the game
  • ...Run Game until game finishes...
  • lms unload <model_id> -- eject model from memory
  • lms server stop -- stop server

Playback data

In playback/ I have the gameplay data from two games:

  • gemini-3-flash vs. gemini-3-flash
  • gemini-3-flash vs. GLM 4.7

About

LLMs playing pvp shooting game

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages