Skip to content

trnamanh12/The-Naming-Game

Repository files navigation

The Naming Game

A simulation of language evolution where agents learn to develop a shared vocabulary through pairwise interactions.

Project Structure

  • image/: Contains results of training.

  • create_graph.py: Contains functions to create different network topologies

    • Full connected network (FFN)
    • Ring network
    • Ring network with random edges
  • environment.py: Core simulation classes

    • Agent: Implements agent behavior and lexicon management
    • NamingGame: Main game logic and simulation control
  • environment_modifield.py: is the modified version of the environment.py file, with the purpose is to make it more efficient and faster.

  • naminggame.py: Main entry point with CLI interface

  • utils.py: Helper functions

Running the Simulation

Default Configuration

# create environment
conda create -n net python=3.11

# activate environment
conda activate net

# install dependencies
pip install -r requirements.txt

# Run with default values
python run.py

# Run with custom values
python run.py --modified_env False --num-agents 50 --num-objects 10 --steps 1000000 --graph-type ring_random --random-edges 40 --initial-lexicon True

# Get help on available arguments
python run.py --help

# Run the modified environment for bonus question
python environment_modified.py

# You can also run it by using args
python run.py --modified_env True --num-agents 50 --num-objects 10 --steps 1000000 --graph-type ring_random --random-edges 40 --initial-lexicon False
# initial_lexicon of modified environment always False

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages