- Updated Wednesday, August 5th 2015 @ 02:14:38
I'm a complete noob when it comes to classes, but I know some basic AI techniques... so the starter bot is driving me crazy! Might someone find it in their heart to write a BasicStrategy for the Python starter bot that shows how to do simple tasks like:
- basing moves on the nextPiece,
- moving pieces (unsure currently... are we able to move the current piece, or must actions be determined before the current piece is on the field?)
- what is to be done with the Field class? It's currently not used at all in the starter code
I'm sure this is an incredibly n00bish question, but I'm also sure that I won't be the only one to scratch my head at the starter bot. The hierarchy just doesn't make sense, but I'm guessing that it's very well organized if I knew a bit more about how it's meant to be used.
Please let me know if you need more info on what exactly I don't understand.
- Created Wednesday, August 5th 2015 @ 21:36:42
Until the source code is released (when beta is over), you'd need to implement all game logic by yourself. Which is a good exercise nonetheless.
I've followed this tutorial for a start, but it stops after a few parts. I've thought about continuing it on my own blog, but I'm kinda busy. I've took a few hints from this tutorial, but the code quality is pretty bad and all over the place.
- Created Wednesday, August 5th 2015 @ 21:40:07
I think I've figured out something that works at least. I appreciate it, though!
- Created Saturday, August 15th 2015 @ 19:52:14
From what I've seen I think you have to first create a new strategy module in the Bot/Strategies folder, using the RandomStrategy.py as a guide. If you do it like the randomstrategy example then your ai goes in the choose() method. You will have access to a self.game attribute which has all the game data. You're probably expected to import the Piece.py module and call create() to have some pieces to play with in your field which accessed by self.game.me.field as far as I can see. Then you must update Planner.py module adding your strategy import line and the name to the switcher dictionary. Then update the last line of the BotRun.py module. I think. I haven't tested it as I have my own. The Field class btw should have
[ * width for row in range(height)]as
[ * width] * heightwill produce a list of 20 rows which are the same row. Change one row and the rest will mimic, cos it's the same row.
- Created Saturday, August 15th 2015 @ 20:06:18
Thanks so much! I hadn't noticed the create method for pieces... that will probably help quite a bit.