{"id":21320349,"url":"https://github.com/turkeymcmac/anosmellya","last_synced_at":"2026-07-06T04:31:22.632Z","repository":{"id":114505394,"uuid":"253359569","full_name":"TurkeyMcMac/anosmellya","owner":"TurkeyMcMac","description":"Smell-based evolution simulator with sexual reproduction.","archived":false,"fork":false,"pushed_at":"2021-03-29T01:55:26.000Z","size":73,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-22T11:30:57.794Z","etag":null,"topics":["evolution-simulator","screensaver","simulation"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TurkeyMcMac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-04-06T00:25:18.000Z","updated_at":"2021-03-29T01:55:29.000Z","dependencies_parsed_at":"2023-05-17T11:00:35.800Z","dependency_job_id":null,"html_url":"https://github.com/TurkeyMcMac/anosmellya","commit_stats":{"total_commits":107,"total_committers":1,"mean_commits":107.0,"dds":0.0,"last_synced_commit":"bc38bfd00851d3edc4eccc1dee6e3a93f05d0321"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TurkeyMcMac%2Fanosmellya","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TurkeyMcMac%2Fanosmellya/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TurkeyMcMac%2Fanosmellya/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TurkeyMcMac%2Fanosmellya/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TurkeyMcMac","download_url":"https://codeload.github.com/TurkeyMcMac/anosmellya/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243801600,"owners_count":20350105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["evolution-simulator","screensaver","simulation"],"created_at":"2024-11-21T19:47:09.834Z","updated_at":"2026-07-06T04:31:22.626Z","avatar_url":"https://github.com/TurkeyMcMac.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Anosmellya\n\nAnosmellya is an evolution simulator.\nThe name is pronounced like \"a nose smell ya,\" and is based on the word\n\"animalia\" and the idea of smells.\nAs the name suggests, animals act based on the intensity of smells around them.\nUnlike my other evolution simulators, this one has sexual reproduction.\nThe idea and parts of the code are borrowed from my project Intergrid.\n\n## Compilation\n\n### For Unix\n\nRun `make`.\n\n### For Windows (with MinGW)\n\nRun this:\n\n```\nCXX=\"$ARCH-g++\" PATH=\"$SDL/$ARCH/bin:$PATH\" CXXFLAGS=\"-Wno-pedantic-ms-format -I$SDL/$ARCH/include -L$SDL/$ARCH/lib -static -Wl,--strip-all,--gc-sections\" make target=anosmellya.exe libs='`sdl2-config --static-libs`'\n```\n\nWhere the variable `SDL` is set to the path of the directory you unzipped from\n[here](http://libsdl.org/release/SDL2-devel-2.0.12-mingw.tar.gz) and `ARCH` is\neither `x86_64-w64-mingw32` or `i686-w64-mingw32`.\n\nA large (statically linked) executable `anosmellya.exe` will be produced.\n\n## Usage\n\nTo run the program with a good configuration, run `./anosmellya` after\nmaking the executable.\n\nYou can get a full list of options by running `./anosmellya -help`.\n\n### Controls\n\nThe keyboard supplies some control at runtime.\n\n* Press **A** to toggle visual smell affinity vectors, provided drawing was\nenabled.\nThis may slow things down.\nA color coded vector is shown around an object scaled relative to the others.\nGreen is plant, blue is herbivore smell, red is carnivore smell, pink is baby\nsmell, and white is velocity.\n* Press **D** to toggle drawing, provided it was enabled in the first place.\n* Press **F** to go forward one simulation tick while paused.\n* Press **Q** to quit.\n* Press **R** to pause/unpause the simulation.\n* Press **S** to toggle statistic printing.\n* Press **W** to toggle waiting.\nIf it is off, then the simulation will run as fast as the computer can process.\n\n### Configuration\n\nConfiguration is given in a simple `KEY = VALUE` format.\nYou can see the full list of configurable parameters, with explanations, in the\nfile `configurations/default.conf`.\nOther interesting configurations are put in the same directory.\nIf a configuration lists working seeds, those seeds might not work on your\ncomputer.\nA fixed seed is only sure to produce fixed output with fixed CLI options using a\nfixed executable on a fixed computer.\nHowever, the initial genes generated might be similar given just a fixed seed.\nUse the option `-conf FILE` to pass another configuration file.\nUse the option `-cs STRING` to pass configuration as a string.\nThe format is the same as for a configuration file.\n\n### Statistics\n\nThe `-print-stats` option enables statistics to be printed.\nOn an interval, a JSON object is printed on a new line of standard output.\nThe default interval is once per 10 ticks.\n(This can be changed with `-stat-interval`.)\nThe fields are as follows:\n\n* `world_width`, `world_height`:\nThe width and height of the world in tiles.\n* `tick`:\nThe sequential tick number when these statistics were generated, starting at\nzero.\n* `herb_avg`:\nThe average stats of an herbivore.\n* `herb_count`:\nThe herbivore population.\n* `carn_avg`:\nThe average stats of a carnivore.\n* `carn_count`:\nThe carnivore population.\n* `plant_total`, `carn_total`, `herb_total`, `baby_total`:\nThe total of each smell across all tiles.\n\nThe `herb_avg` and `carn_avg` objects have the following keys:\n\n* `age`:\nThe current age, in ticks.\n* `baby_smell_amount`:\nThe baby smell produced per tick when fertile.\nThis may be negative.\n* `baby_threshold`:\nThe amount of food above which the animal becomes fertile.\n* `baby_food`:\nThe amount of food given by a mother to a newborn.\n* `plant_aff`,  `herb_aff`, `carn_aff`, `baby_aff`:\nThe affinities for the different smells.\n* `vel_aff`:\nThe velocity \"smell\" affinity.\n\nAll the fields ending in `aff` have the following keys:\n\n* `impulse`:\nThe impulse vector as a two-item list where the first item's x and the second y.\n* `plant_effect`, `herb_effect`, `carn_effect`, `baby_effect`:\nThe impulse effects for each smell.\n* `food_effect`:\nThe impulse effect for the amount of food the animal has.\n\nFor more information about the meanings of the keys, see the\n**Evolvable Traits** section.\n\n## About the Simulation\n\nRed carnivores eat herbivores.\nBlue herbivores eat plants.\nGreen plants spontaneously appear, and are not alive.\nThe living animals act based on the smells around them.\n\n### Smells\n\nThere are four smells in the simulation.\nThey all disperse and evaporate at configurable rates.\nThe smells are as follows:\n\n* Plants:\nPlants themselves are treated as a smell.\nPlants are dropped in globs and are eaten by herbivores.\nPlants do not grow, but rather evaporate like all other smells.\n* Herbivore smell:\nHerbivores produce a fixed amount of smell every tick.\nThis lets herbivores find kin and carnivores find prey.\n* Carnivore smell:\nCarnivores also produce smell for a similar purpose.\n* Baby smell:\nThis is produced by an animal when it has enough food for a baby.\nThe intention is that others of the species use baby smell to find mates.\nThe amount produced per tick can evolve.\nNote that one baby smell is shared between herbivores and carnivores.\n\n### Evolvable traits\n\nYou can see the full list of traits that evolve by looking at `Animal::mutate`\nin `src/Animal.cpp`.\nThe main evolving traits are the \"smell affinities.\"\nA smell affinity has several parts.\nThe main part is the \"impulse,\" a 2D vector quantity.\nAn animal looks at the four adjacent squares and determines a smell gradient.\nThe impulse is rotated so that the smell gradient vector becomes the x-axis.\nThe impulse is changed based on several coefficients.\nThe coefficients correspond to all the smells on the current tile as well as the\nanimal's amount of food.\nThe coefficients are multiplied by their respective quantities then added to the\nmagnitude of the impulse.\nThe acceleration for a tick is the sum of all scaled impulses, normalized to a\nconfigurable amount.\nThere are smell affinities for each of the smells.\nThere is also one where the input is the animal's velocity vector rather than a\nsmell gradient vector.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturkeymcmac%2Fanosmellya","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturkeymcmac%2Fanosmellya","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturkeymcmac%2Fanosmellya/lists"}