-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fragile moves/items usage #4
Comments
I will add enums for commands in my PR, but let's discuss the rest first. |
PR #7 for command (I meant action) enums. |
Also I find strategy-centered indexing (e.g. 2 means "second of my items") to be a bit weird, if we're sticking with numbers let's at least use a global indexing (e.g. 2 always means "cookie) and a table somewhere in a PDF. |
I prefer strategy-centred indexing, it makes you focus only on the moves you selected. Also, you will otherwise have to verify that every time you return an action, it is a valid one (so |
I don't think that would be hard to code from game engine perspective, but I see what you mean. I am still not the biggest fan of raw numbers (especially when you have ~10 items), maybe |
If we're wishing to optimize for the ease of use when defining new strategies, perhaps we should use enums or strings for moves/items in
Strategy
classes. Ideally instead of returning0, 1
fromchoose_action
competitors should returnPERFORM_MOVE, ATTACK
. This is much more readable for complex strategies and I believe will lead to less dumb mistakes.The text was updated successfully, but these errors were encountered: