-
Notifications
You must be signed in to change notification settings - Fork 69
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
introduce a database of mazes with descriptive metadata, for example number and length of dead-ends, etc. #849
Comments
Looking at #852 , we need to discuss what to store in the layout database. This depends in my opinion on how we plan to use that information. I envision something like this: pelita --trapped-food 0.3 bot1.py bot2.py where The way it would work should be the following:
What do you think @Debilski ? If we agree on this use case, we can design the database to make this the privileged and optimized use case. Given that the database is private, I think we can change it later with not too much trouble should the need arise, given that #852 is optimized as hell and tuns in ~10 seconds on 1600 layouts. |
Couple of thoughts:
Going forward, my suggestions would then be something like:
|
this is not strictly necessary, but we can of course re-generate all layouts without using the code that removes dead-ends and chambers
Well, not really. Imagine I set
See above, I don't think we can avoid it.
I am not sure I agree. A defender may decide to "guard" the entrance of a chamber for too long and then the food will be relocated at random, so it may be relocated outside of the chamber. This is fine in my opinion. The
For development situation, if you want to replay on the same maze with the same food you just use
For me it is not about danger, but if we want
OK, OK, but that is something else, we can talk about it later. Note that live maze generation is not doable at the moment: it is too slow.
Sure.
See above, I don't think this is feasible.
I don't think it is feasible. Generating the mazes takes too long. |
I think I have been slightly misunderstood: I never meant to parse and analyse all mazes before a match instead of using a database. No matter how fast the algorithm gets, this would break down on a slow file system. However, my approach assumes that this is not necessarily needed.
My approach was: Draw any layout fitting the size from our pre-generated layouts and then place the food according to the requested (or hard-coded) specification. If the maze doesn’t have enough dead-ends or chambers to place food: bad luck. (Or good luck!) (The only problem would be if this breaks down too often. Then a db could help with pre-selecting.) Aside: Please let’s not invent something that needs to use a number like 0.33 as a default. That number doesn’t look right. :) Perhaps
The idea was more: If
But our own selection of mazes would not have the food pre-set? Then I think I misunderstood it.
That’s why I am more in favour of a who-cares algorithm that takes any maze and just places the food as good as it can. With the database you now have to figure out a selection algorithm.
Yes, that’s why I meant, pre-generated: They will be generated when the yaml file for the tournament is created, during tournament setup.
During tournament setup time it should work. |
yes, so I think we agree on almost everything. The plan would be this: #856 (comment) . If maze generation is fast enough, we can really get rid completely of the hard coded mazes. |
No description provided.
The text was updated successfully, but these errors were encountered: