Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Nomic Game Simulation

Overview

The nomic.py script is a simulation of the game Nomic, where players propose and vote on rule changes in an attempt to reach a winning condition. The game involves a mix of human players and language models (LLMs), each embodying a unique character with specific strengths and strategic approaches.

How It Works

The game starts with a predefined set of immutable and mutable rules. Players take turns proposing rule changes, which are then voted on by all players. Points are awarded or deducted based on the outcomes of these votes, and the game continues until a player reaches the winning condition of 150 points or another defined winning condition.

Key Components

  • Character Selection: Each LLM is assigned a character with unique traits, which influence their strategic decisions.
  • Game State Management: The game state, including current rules, player points, and turn order, is maintained and updated as the game progresses.
  • API Calls: The script makes API calls to language models to generate responses for rule proposals, debates, and votes.
  • History Summarization: The game history is summarized using a BERT model to ensure that it remains manageable in size.
  • Rule and Vote Extraction: Proposed rules and votes are extracted from the responses generated by the LLMs.

Future Enhancements

Here are some potential future enhancements for the Nomic game simulation:

  1. Improved Strategy Models: Develop more sophisticated strategies for the LLMs based on game theory and advanced machine learning techniques.
  2. Dynamic Rule Analysis: Implement more advanced methods for analyzing and validating proposed rule changes to prevent conflicts and enhance gameplay.
  3. User Interface: Create a graphical user interface (GUI) to visualize the game state, proposed rules, and player actions in real-time.
  4. Multiplayer Mode: Allow multiple human players to join the game and interact with the LLMs in a real-time multiplayer environment.
  5. Enhanced History Management: Implement more efficient methods for managing and summarizing game history to improve performance and scalability.

How to Run the Script

  1. Install the necessary dependencies:
    pip install torch transformers
  2. Ensure you have the necessary API key for the Anthropic client:
    client = anthropic.Anthropic(api_key="your_api_key")
  3. Run the script:
    python nomic.py

Requirements

  • Python 3.7+
  • torch library
  • transformers library
  • anthropic library

Files

  • nomic.py: The main script to run the Nomic game simulation.
  • game_state.json: A file to store the current game state.
  • game_history.txt: A file to store the game history.

License

This project is licensed under the MIT License.