Scripts for editing bibites and save files for The Bibites game
This section goes over the steps needed to setup this project on your machine and run the scripts or jupyter notebooks
Python 3.10 (may work on earlier versions too)
Create a virtual environment before installing requirements
python -m venv venv
Activate the virtual environment, on Windows do this:
.\venv\Scripts\activate
On linux/macOS, do this:
. venv/bin/activate
Install requirements
python -m pip install -r requirements.txt
Jupyter lab is useful for visualizing data from a save file (see graph.ipynb)
To start, run this command:
jupyter-lab
(you must install dependencies first, see setup section for details)
Overview of current scripts
This script makes a copy of the included save file with some genes modified for all the Bibites.
python edit_save.py
Currently this is hardcoded to edit the included save-file (world_autosave_20220917102459.zip
),
but this can be customized by editing the src
variable in the main
function:
src = root / "world_autosave_20220917102459.zip"
Next you may customize the new_genes
dict in the main
function to the ones that
you'd like to change.
new_genes = {
"BrainMutationSigma": random.uniform(0.15, 0.4),
"BrainAverageMutation": random.uniform(1.5, 4.0),
}
random.uniform
is useful for specifying a range of values for the population, where each
Bibite gets a random value within this range.
This could also be a single value instead:
new_genes = {
"Diet": 0.2,
}