An evolution toy of floorplan cellular morphogenesis.
|
5 years ago | |
---|---|---|
godot | 5 years ago | |
pictures | 5 years ago | |
.gitignore | 5 years ago | |
LICENSE | 5 years ago | |
README.md | 5 years ago |
A system of cells that can pass signals to each other and morph into different types in order to generate a floor plan. Right now there are 2 types: a Room and a Corridor. Corridor (MAGENTA) receives bonuses for fetching as many valid rooms as possible without becoming too big. Room (GREEN) receives bonuses for being connected to a valid corridor or to another valid room.
Signals are represented as 2D fields which can be both positive and negative. At each tick a cell receives fields of neighbors and transforms them using a SIGNAL_COUNTxSIGNAL_COUNT matrix of its type.
It then proceeds to add its own production vector to it.
If fields are matching a proliferation condition, cell changes its type.
By the end of all ticks, rooms are segregated according to room type and also by values of first 2 signals. These 2 signals's signs create a 2 bit field with 4 possible values, which is enough in graph coloring theory to make an arbitrary 2D segregation even without type differences.
After segregation, chambers are scored.
System maintains a limited population of "individuums" that mutate their cell types (signal transformation matrices, production vectors and proliferation conditions). Each individuum is given several tries (i tried with around 10 and 100) and its score is averaged. For each try, initial state is a floor filled with a random mix of cells of both types.
Every 30 generations there is a reevaluation when every individuum is retested with 3 times as much trials as usual. This weeds out some of individuums that were just too lucky and now stuck at the leaderboard.
Unfortunately, the mechanism is too random for even 100-average score value to be stable so search is kinda hard.
For large signal counts it might be hard to find a non-0 score. Most common way individuums obtain 0 score is by not proliferating a single cell over their entire trial course.