oyeb / phoenix Goto Github PK
View Code? Open in Web Editor NEWThe AI Challenge backend for Anokha 2017
License: MIT License
The AI Challenge backend for Anokha 2017
License: MIT License
Each line on the file seems to be valid json, but that's not enough.
bot's STDERR -> debug_log
bot's STDOUT -> move_log
What if the bot is making an invalid move? We register an exception on the gameloop
STDOUT but the bot is never told that. The gameloop can log errors-that-happen-due-to-bots in a error_log.
There could be a error_log per bot.
This log cannot be seen by the bot, in any iteration. Should we send the errors-in-prev-iter to the bot as part of the new game-state?
There is some event logging in gameloop
STDOUT, a tuple of (turn_no, [list-of-events]) would be a compact event log (Since turn_no
is explicit, we don't need a row for empty turns).
This log cannot be seen by the bot, in any iteration. Should we send the errors-in-prev-iter to the bot as part of the new game-state?
This is not a trivial task. The amount of information available to a bot is the sum of information available to it's children.
So, we need to perform bounding-box (BB) tests for each child.
Relevant code: gamectl.py
The select syscall prematurely exits after the buffer is flushed. The STDOUT of the bots buffer size has to be increased exactly.
after a bot dies, it is still on the game_state_log.txt
but its details don't change, thus the UI displays dead bots.
Fix: the game_state_log.txt
must contain the bot details until the bot dies.
related file gamectl.py
The server is exception-safe, handles stuff gracefully but phoenix doesn't.
If the game terminates due to an unhandled exception the game_state_log
will be empty.
Otherwise the raw_input() keeps waiting and select() eventually takes over. This should be done in the engine as well a map.
if a bot gains a bigger score and there are only two bots remaining on the map, if the bot with bigger score raises some kind of exception, that particular bot's execution stops. Then when there are less than two bots on map, the game execution stops. The bot with higher score just wins it, the bot with higher score can win with a cheat.
The following are mandatory:
scores : [ ... ]
bot_names : [ ... ]
this_bot: <this-bot's-name> | null
map : "map"
iters : #
winner : ""
this_bot
is null
if the game is among real bots. If this game is being run for an online submission against sample_bots only, then the value is <this-bot's-name>
What more?
related file /src/engine/gamectl.py
Need to add this to botapi.
All writes for 1 iter must be clubbed in a list. Each of these lists must be mapped to iteration #.
There should be nothing in the dict for if there is no log for that iteration.
Debug log must be valid JSON.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.