You can apply the same ideas for
mutate
. In short, don't return a pointer & use the modern random facilities. This also gives you the added benefit of more control in an easy way: what if you don't want a uniform distribution? You want to weight it in some exotic way? Much easier with<random>
than doing it by hand!In general, it would help if you explained how the relevant concepts relate to the expected components of a genetic algorithm. For example, it seems that
Thinker
is a chromosome (i.e., a candidate solution), but it would be nice to see your fitness function as well, and so on. This helps in communicating ideas and in the (self-)documentation of your code.If you don't have a fitness function, your search essentially only progresses by mutation likely making it very inefficient as it explores the search space in random manner without any guidance.
You can apply the same ideas for
mutate
. In short, don't return a pointer & use the modern random facilities. This also gives you the added benefit of more control in an easy way: what if you don't want a uniform distribution? You want to weight it in some exotic way? Much easier with<random>
than doing it by hand!In general, it would help if you explained how the relevant concepts relate to the expected components of a genetic algorithm. For example, it seems that
Thinker
is a chromosome (i.e., a candidate solution), but it would be nice to see your fitness function as well, and so on. This helps in communicating ideas and in the (self-)documentation of your code.
You can apply the same ideas for
mutate
. In short, don't return a pointer & use the modern random facilities. This also gives you the added benefit of more control in an easy way: what if you don't want a uniform distribution? You want to weight it in some exotic way? Much easier with<random>
than doing it by hand!In general, it would help if you explained how the relevant concepts relate to the expected components of a genetic algorithm. For example, it seems that
Thinker
is a chromosome (i.e., a candidate solution), but it would be nice to see your fitness function as well, and so on. This helps in communicating ideas and in the (self-)documentation of your code.If you don't have a fitness function, your search essentially only progresses by mutation likely making it very inefficient as it explores the search space in random manner without any guidance.
- You can apply the same ideas for
mutate
. In short, don't return a pointer & use the modern random facilities. This also gives you the added benefit of more control in an easy way: what if you don't want a uniform distribution? You want to weight it in some exotic way? Much easier with<random>
than doing it by hand!You can apply the same ideas for
mutate
. In short, don't return a pointer & use the modern random facilities. This also gives you the added benefit of more control in an easy way: what if you don't want a uniform distribution? You want to weight it in some exotic way? Much easier with<random>
than doing it by hand! In general, it would help if you explained how the relevant concepts relate to the expected components of a genetic algorithm. For example, it seems that
Thinker
is a chromosome (i.e., a candidate solution), but it would be nice to see your fitness function as well, and so on. This helps in communicating ideas and in the (self-)documentation of your code.
- You can apply the same ideas for
mutate
. In short, don't return a pointer & use the modern random facilities. This also gives you the added benefit of more control in an easy way: what if you don't want a uniform distribution? You want to weight it in some exotic way? Much easier with<random>
than doing it by hand!
You can apply the same ideas for
mutate
. In short, don't return a pointer & use the modern random facilities. This also gives you the added benefit of more control in an easy way: what if you don't want a uniform distribution? You want to weight it in some exotic way? Much easier with<random>
than doing it by hand!In general, it would help if you explained how the relevant concepts relate to the expected components of a genetic algorithm. For example, it seems that
Thinker
is a chromosome (i.e., a candidate solution), but it would be nice to see your fitness function as well, and so on. This helps in communicating ideas and in the (self-)documentation of your code.
- 4.3k
- 12
- 24
- 36
I don't know anything about Factorio which your question also seems to be about, so I can't say anthinganything about "missing important IdeaTypes", for instance.
I don't know anything about Factorio which your question also seems to be about, so I can't say anthing about "missing important IdeaTypes", for instance.
I don't know anything about Factorio which your question also seems to be about, so I can't say anything about "missing important IdeaTypes", for instance.