A simulation of language evolution where agents learn to develop a shared vocabulary through pairwise interactions.
-
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 classesAgent
: Implements agent behavior and lexicon managementNamingGame
: Main game logic and simulation control
-
environment_modifield.py
: is the modified version of theenvironment.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
# 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