rfjakob / barwin-pc

PC software for the Barwin cocktail robot
http://barwin.suuf.cc/
2 stars 0 forks source link

Autoloading Risky Barwin fails after 10000 attempts #10

Closed rfjakob closed 10 years ago

rfjakob commented 10 years ago

@speendo: should / can we use a more directly controlled way of generating the first generation? Looks like just selecting from a random pool does not work very well for seven ingredients. This is with the settings (in %):

initMeanValues=10 10 20 30 10 10 10
initOffsets=30 30 30 30 30 30 30

Error is:

--------------------------------
--- AUTOLOADING GENERATIONS ----
--------------------------------
- Mate Spezi                        AUTOLOAD
- Risky Barwin                      ERROR
genBot.GeneratingRandomCocktailsException: Tried 10000 times to find a cocktail that meets the cost and content constraints.
    at genBot.EvolutionAlgorithmManager.generateCocktailGeneration(EvolutionAlgorithmManager.java:208)
    at genBot.EvolutionAlgorithmManager.<init>(EvolutionAlgorithmManager.java:32)
    at genBot.EvolutionStackContainer.load(EvolutionStackContainer.java:51)
    at genBot.RemoteOrderImpl.loadEvolutionStack(RemoteOrderImpl.java:60)
    at genBot.RMIServer.autoload(RMIServer.java:51)
    at genBot.RMIServer.main(RMIServer.java:32)
--------------------------------
lumbric commented 10 years ago

Concerning the question of how to generate boxed random values which sum to 1:

http://www.mathworks.com/matlabcentral/fileexchange/9700-random-vectors-with-fixed-sum/content/randfixedsum.m

That is not a very beautiful, but maybe effective solution.

/cc @petres and @speendo