Skip to content

seal144/rec_w

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PUBLISHED AT

https://seal144.github.io/rec_w/

ABOUT PROJECT

This project, called Rectangle World, is a simple evolution simulator. In this world live two kinds of creatures: plants and bugs. Plants aren't subject to evolution, they are only the first link in the trophic chain. Bugs are more interesting, they have two purposes: eat when hungry, and mate when full. Bugs have four features (inherited from their parents): speed, size, senses, and aggression.

Being a fast bug has obvious earnings but it is associated with shorter life and greater energy loss when in move. Bigger bugs have an advantage because smaller bugs run away from bigger ones (when the difference is significant). Size is associated with a greater energy cost of moving and reproducing. When a bug is big and fast its movement energy loss grows exponentially. Bug with sharp senses has a bigger field of view, which helps to find a treat or lover. However, better senses involve higher energy loss and more often notice a bigger bug, which forces fleeing. Aggression indicates how often a bug shares food when eating with another bug (there is space only for two bugs near one plant). If two bugs choose to share food, each gets half of the plant. If one critter chooses not to share, this bug gets all the food and another one gets nothing. If two bugs choose not to share, no one gets any food. However, critters remember who didn't share with them and in the future, they are not so willing to share with this individual. The features of a bug determine its appearance.

To reproduce, bugs have to find another critter, who also wants to mate and is representative of the same species. Children inherit features after their parents with some inaccuracy. With passing generations in this small world new species arise.

Some parameters of the world can be set in the settings.

In this project was used: vanilla JS (with object oriented programming), HTML, CSS, canvas.

About

Evolution simulator (Created for fun :D) https://seal144.github.io/rec_w/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published