Answer the question
In order to leave comments, you need to log in
How to get rid of ban (number of questions) on stackoverflow.com?
After the second time I deleted my question with a low reputation (they gave me a medal for the first time), when I tried to ask a question
You have a history of asking low quality questions. Please put more thought, time, and effort into your questions. To help you do this, the number of questions you may ask per week is currently limited. For more information, visit the Help Center.
Answer the question
In order to leave comments, you need to log in
If you need a genetic algorithm, then you need to do this:
1. Create a random population of drivers, each with their own set of coins.
2. Drive these drivers along the route.
3. Drop a certain percentage of the most unfortunate drivers.
4. The remaining drivers "cross", "mutate".
5. Repeat the algorithm, starting from point two, until the results of the most economical drivers in the population stop improving.
Somehow, probably. It remains to figure out how to "cross" and "mutate".
"Crossing" can be done, for example, by generating a new driver with a random set of coins from the pockets of his "parents". And "mutate" by selecting a random coin, and giving it to a friend in return for a random one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question