Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variation through Genetics #46

Open
mjuvekar7 opened this issue Jan 9, 2017 · 4 comments
Open

Variation through Genetics #46

mjuvekar7 opened this issue Jan 9, 2017 · 4 comments

Comments

@mjuvekar7
Copy link
Contributor

I am writing this post to suggest a neat new feature that could be added to this module: the addition of variety through simple genetics.

Currently, plants in the SimpleFarming module have very fixed properties that do not change much when new plants are grown. This can be improved by using simple genetics to produce variety in various properties of plants. The resultant genetic system could be used to create hybrids of various seeds, breed animals (when animals are added), etc.

Each seed (and thus each plant) should have a certain "genome" component, which has binary properties which can be one of two variants: one dominant and one recessive (somewhat like real life genetics). These traits will define hereditary features of the plant like color, height (tall/short), thickness (thick/thin), etc. Many of these properties may not seem binary, but once you know whether a tree is tall or short, you can add some noise to a pre-defined height corresponding to "tall" to get a unique-ish height. This could be further improved by adding support for continuous traits represented by floating point numbers (see Genetic Algorithms).

A system must also be created which will be able to take two genome components and create a hybrid from them. The basic outline of this process is to cross the two components using a Punett Square or something similar to find all possible outcomes with appropriate weights, and then to pick a random outcome from the weighted list. This system can lead to interesting gameplay options, such as creating hybrid seeds which have good traits of different kinds of seeds, and thus produce better stuff (see Hybrid Seeds).

Note that the mechanism for this already exists in a more abstract and general manner in the Genome module, which provides an infrastructure to create genes and cross them using different breeding algorithms. In fact, since the Genome module already contains a lot of the mechanism required to implement this system, it may make sense to extend the Genome module into a more specific system instead, and then use it to implement genetic variation in the SimpleFarming module.

This could also be extended to an animal husbandry module which could then be used to make interesting hybrid animals such as sheep which yield more wool of a desired color, or maybe cows which produce more milk and give more leather. The possibilities are nearly endless.

@mjuvekar7
Copy link
Contributor Author

mjuvekar7 commented Jan 9, 2017

Please do leave your suggestions in the comments :)
@Cervator I believe you were interested in this.

@Cervator
Copy link
Member

Cervator commented Jan 9, 2017

Yep! This sounds good to me :-)

We probably need to get food consumption fixed, that way one initial target could be how "filling" produce from a plant is. Easy value to vary.

@jdrueckert
Copy link
Member

@vedant-shroff Mind updating this according to the progress achieved in your GSoC project?

@vedant-shroff
Copy link
Contributor

#82 (comment) has a summary of what I have added to integrate SimpleFarming with Genomes. The new integrations can be used easily to allow traits to be passed on from parents to offsprings and has been done successfully with bushes and seeds. This has also been done in WildAnimalsGenome which is now up to date with the latest version of Genomes, and adding new traits should be an easy procedure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants