- Updated Friday, November 20th 2015 @ 01:38:34
Guys I wrote a tool for you to be easily able to test your bots.
There are some issues I'm aware of but please feel free to report any you see :)
The advantages of this over the official engine are:
- you can run it offline
- you can prefix lines with '#' to view them in debug output
- it's fully open source so you can modify it however you want to better help test your bot
And some disadvantages are:
- It will run on POSIX compliant systems (because you'll need mkfifo to be able to talk to your bot)
- it doesn't do skips yet
- Created Friday, November 20th 2015 @ 17:29:05
Hi, Thank you, great job !
I've a bug when trying my bot, I sent you all the details through bitbucket messages. The bug is related to python starter bot parser and your engine ("update mybot xxxx" instead of "update player1" ?).
- Updated Friday, November 20th 2015 @ 21:34:16
I assumed as long as I sent the player-names and your-bot settings previously there wouldn't be an issue but I have now fixed it to "player1" as that works just fine
Thanks for pointing that out :)
- Updated Tuesday, November 24th 2015 @ 13:23:36
You should know that you won't receive updates for "player2" because I don't have any means for running a 2nd bot or simulating its behaviour.
edit: I am now sending the same data for player2 as player1
- Updated Friday, November 20th 2015 @ 23:28:33
Thank you for the change, you were right the name could probably be anything. I have another idea when your engine sends "'settings playernames ' + ['player1'].join(',')", the result is "settings playernames player1", right ?
In the python bot parser the bot needs 2 names, one for the bot and one for opponent :
if values == 'player_names':
self._playerNames = values.split(',') => Storing 2 names
elif values == 'your_bot':
self._game.me.name = values => assigning the bot name (any name) self._playerNames.remove(values) => removing 1 name from the list self._game.enemy.name = self._playerNames => the remaining name is for the opponent
I got the error on the last line : self.game.enemy.name = self.playerNames => IndexError: list index out of range because the list is empty.
Could you try to add a dummy 2nd player name please ? Also changing the python parser code won't be hard (something like, "if len(self._playerNames) > 0:")
- Updated Saturday, November 21st 2015 @ 01:13:02
Lets not have the implementation specific discussion here :)
If the bots require 2 players for sure, I'll just publish dummy data
So now I'm sending the same data for player2 as player1.
- Created Tuesday, November 24th 2015 @ 13:03:24
I assume that each and every player in top 10 has similar tool. I just consider this a part of competition - making infrastructure for successful bot development
- Created Tuesday, November 24th 2015 @ 13:20:40
Well there are bots with 100+ revisions. I am sure some of this is due to lack of good testing utilities.
I would have wished there was a readily available tool for me to write my bot against when I started developing it. There wasn't, so I wrote one. And having written one I see no harm in sharing it.
Those people in top 10 could have saved hours if such a tool existed. That time could have been spent improving their bots or doing something else.
- Created Wednesday, November 25th 2015 @ 19:07:46
Your reasoning is "logical" but flawed. You just dont take into account human nature :) For example i'm very impatient and load new versions too frequently when some interesting things emerge in my testing. I know about statistics perfectly but it's just human nature :) Of course your tool is valuable for those who dont have decent testing. And your tool if used could improve the level of competition. I'm ok with that.
- Created Tuesday, December 1st 2015 @ 06:48:54
Hey, thank you for creating this!
I am a newbie to the AI challenges, and I was trying to understand how to use your engine to test my bot.
After following your directions on how to run it, a new Electron window opens up with this error message: "Not allowed to load local resource".
Do you have any advice on how to move past this? Thank you!
- Created Tuesday, December 1st 2015 @ 07:30:18
Hi and thank you :)
If you missed it, they released the official engine but it doesn't come with a UI
Can you tell me which command you used to start the electron, and which command you used to start your bot please?
- Created Tuesday, December 1st 2015 @ 19:21:58
On one terminal window, with path to your tetris engine, I wrote: mkfifo from-engine mkfifo to-engine node_modules/.bin/electron ./ < to-engine | tee from-engine
On another terminal window, with path to my bot, I wrote: python botrun.py < /path/to/tetris-engine/from-engine > /path/to/to-engine (with the actual paths)
As soon as I run the last command, an electron window opens up, with the above-mentioned error: "Not allowed to load local resource"
Thanks for your help!