halitechallenge / halite-iii Goto Github PK
View Code? Open in Web Editor NEWSeason 3 of @twosigma's artificial intelligence programming challenge
License: MIT License
Season 3 of @twosigma's artificial intelligence programming challenge
License: MIT License
Inspired by #80
Will also need to reupload kits to online editor.
I noticed it particularly in this game: http://halite.io/play/?game_id=717656&replay_class=0&replay_name=replay-20181019-051624%2B0000-1539926174-64-64
Firefox (huh, didn't Mustcontain win this game?):
It doesn't seem to happen for every game - I think this game is the only example of it I could find, after checking out maybe 10 or so.
Following up on discussion in Discord. We'd like to have a proposal from community on colors that work.
Thoughts for now:
Neither the button on user analysis pages nor the link on the leaderboard. I'm on Firefox 62.0.3 (64-bit).
Spawns are processed at frame start, but collisions are processed at frame end
To reproduce, run the engine like this:
halite.exe --no-replay --results-as-json my_bot.exe my_bot.exe
Expected JSON output, but it prints nothing.
Apparently docs mention --no-timeouts but code takes --no-timeout.
These are the known C# starter kits:
This should match the other compile check steps.
Currently processes are forcefully terminated at the end of the game.
Halite-III/game_engine/networking/unix/UnixConnection.cpp
Lines 89 to 91 in 7b7deb7
Halite-III/game_engine/networking/win32/WinConnection.cpp
Lines 99 to 110 in 7b7deb7
The use of SIGKILL
inside UnixConnetion.cpp
forcibly shuts down the process without giving it a chance to clean up. Thus, atexit handlers, such as the ShutdownHooks inside Log.java
of the Java kit, do not have a chance to run. While I am not as familiar with process signalling on Windows, this article form Dr. Dobbs suggests that TerminateProcess
in WinConnection.cpp
is equally dangerous.
My suggestion would be using a gentler process of sending SIGTERM
(and its Windows equivalent) to give the process a chance to clean up, and then using forcible termination after a short delay if the process hasn't exited by then. This allows higher level languages to perform internal cleanup operations and would also allow users to write their own cleanup functions, e.g. to flush log files.
In the visualiser there's this statistic next to the score, and when you mouseover it it defines efficiency as "current halite / halite collected" (i.e. where collected means 5000 + all deposits ever made).
But this is very different from the concept of efficiency in a player profile, which I believe is something like deposits / non-inspired mining?
Examples:
And some other 4 player games from v15 of my bot.
I found this odd, because my code is moving the ships from the start...
I downloaded the replay from the example 1 (unzip):
776803.hlt.zip. I'm watching it in https://github.com/fohristiwhirl/fluorine. However I don't see the log of my bot. I found it was run with --width 56 --height 56 -s 1540104221
so I tried to reproduce it locally with run_game.sh
:
./halite --replay-directory replays/ -vvv -n 4 --width 56 --height 56 -s 1540104221 "./MyBot" "./MyBot" "./MyBot" "./MyBot"
But this runs game with 4 bots of mine and then everything works.
Error:
Turn 1
error: failed to decode bot message: "C" (at position 1)
Last input received was:
Caused by: java.lang.ClassNotFoundException: MyBot
Appears to happen in Windows 10 with the following Java versions installed:
Java 8 (171)
Java 10.0.2
I am working on a julia starter-kit. Will have a PR ready soon. Shout out to me if anybody wants to join.
Follow this guide to create a new starter kit for C#.
Missing in:
From https://github.com/HaliteChallenge/Halite-III/blob/master/starter_kits/C%2B%2B/README.md:
Linux users: if you're having problems running the bundled halite executable, you will probably want to build your own from source.
Where is the bundled halite executable?
I also tried to build game_engine
(this will produce halite
, right?) with:
cmake .
make
with gcc 7.3 and 8.1 on Ubuntu 16.04 compatible OS, but make
fails with:
ld: unrecognized option '--push-state--no-as-needed'
.
Users are unable to login to forums.
To reproduce, run the engine with the following Python bot:
assert False
On Windows, I get the following results:
.\halite.exe "python3 my_bot.py" "python3 my_bot.py"
[info] Map seed is 1539953260
[info] [P0] Launching with command py my_bot.py
[info] [P1] Launching with command py my_bot.py
[info] [P0] Initializing player
[info] [P1] Initializing player
[info] [P0] Initialized player Traceback (most recent call la
[info] [P1] Initialized player Traceback (most recent call la
[info] Player initialization complete
[error] [1] [P1] Communication failed
[error] [1] [P0] Communication failed
[error] [1] [P0] Last input received was:
[error] [1] [P0] File "my_bot.py", line 1, in <module>
[error] [1] [P0] assert False
[error] [1] [P0] AssertionError
[error] [1] [P1] Last input received was:
[error] [1] [P1] File "my_bot.py", line 1, in <module>
[error] [1] [P1] assert False
[error] [1] [P1] AssertionError
...
This is incorrect. The bot's name clearly isn't "Traceback (most recent call la". And the ending of the diagnostic message is lost!
For comparison, I get much more reasonable results on Linux:
./halite "python3 my_bot.py" "python3 my_bot.py"
[info] Map seed is 1539953470
[info] [P0] Launching with command python3 MyBot.py
[info] [P1] Launching with command python3 MyBot.py
[info] [P0] Initializing player
[info] [P1] Initializing player
[error] [P0] Failed to initialize
[error] [P1] Failed to initialize
[error] [P0] Player's error output was:
[error] [P0] Traceback (most recent call last):
[error] [P0] File "MyBot.py", line 4, in <module>
[error] [P0] assert False
[error] [P0] AssertionError
[error] [P1] Player's error output was:
[error] [P1] Traceback (most recent call last):
[error] [P1] File "MyBot.py", line 4, in <module>
[error] [P1] assert False
[error] [P1] AssertionError
...
Follow this guide to create a new starter kit for Ruby.
I can't comment for the other starter kits, but I don't think naive_navigate
function should mark the cell unsafe (here)[https://github.com/HaliteChallenge/Halite-III/blob/ab9b43add935518734bd16f71e257048b2240ff6/starter_kits/Python3/hlt/game_map.py#L235]. For me, this is an unwanted side effect and I think the direction getting function could be split out.
Can I confirm that the bot compiles with the hlt
module included in our projects? If this is the case I'll just change it there.
Error:
error: communication error with bot: read failed, errno was: 0 (Success)
Bot error output was:
/usr/local/lib/python3.6/dist-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module’s documentation for alternative uses
import imp
Traceback (most recent call last):
File “MyBot.py”, line 7, in
import model
File “/home/worker/Halite/apiserver/worker/tmpy76dau6m/496_0_jwjohns/model.py”, line 7, in
from tqdm import tqdm
ModuleNotFoundError: No module named ‘tqdm’
Need to bake these libs into base image
Incorrectly tries to create a new bot.
It would be nice if the halite.io website was available over HTTPS.
Free suggestion:
https://letsencrypt.org/
Challenges: give rank, tier, and %/# of games won. Link to games played.
Visualizer: give tier; move unit selection card to floating window.
Overall: maybe a long press/hover popup widget for quick user info?
After that we can switch to cargo build, instead of rustc.
If the Python starter kit is intended as the most accessible for aspiring AI developers, it's eventually worth moving the Player class out of game_map.py and into its own file.
At this stage of the competition it may temporarily create some backwards compatibility issues if anyone is importing the Player class from game_map, but that's unlikely to be a significant issue because:
ref: https://github.com/HaliteChallenge/Halite-III/blob/master/starter_kits/Python3/hlt/game_map.py#L9
Two of my ships always collide immediately (upon spawning) when playing games online, leaving me with only 3 ships to start with every game.
However, there was no such problem when I was running games locally. I always successfully resolve their movements without collision and start with 5 ships every time.
Please help look into this, thanks!
Then add "normalize" function to position class.
so that people can build extensions, etc
Found by ChatTor on Discord:
Anyway, I found a seg fault in the halite executable for Linux and am not sure what causes it. I can reproduce it with the following:
Round 1: Send g\n\n
Round 2: Send g\nm 0 s\n\n
It seems to seg fault immediately after that
Please upgrade the Lua interpreter to Lua 5.3 if possible and enable it in the compiler.py script by differentiating between LuaJIT and Lua 5.3 via an additional file extension, e.g. .lua53 or .luajit.
LuaJIT implements most of Lua 5.2 already, Lua 5.3 is the current standard and has been released over three years ago.
This is hard for me to verify, but I was getting a string of these segfaults this morning. They seemed to happen immediately after statements like this:
[warn] [31] [P1] entity 0 was directed to use 1 halite to move west, but only 0 halite was available [warn] [31] [P0] entity 1 was directed to use 1 halite to move east, but only 0 halite was available [warn] [31] [P0] owned entities 5, 1 collided on cell (9, 16) as the result of moves on this turn [warn] [31] [P1] owned entities 4, 0 collided on cell (22, 16) as the result of moves on this turn run_game.sh: line 6: 18498 Segmentation fault: 11 ./halite --replay-directory replays/ -vvv --width 32 --height 32 "java -jar build/libs/halite3-6.jar" "java -jar build/libs/halite3-6.jar"
I added some more protection around fuel management, and the errors went away.
The drag and drop upload works fine, but when you use the file selection dialogue, it is validating for
file.type === "application/zip"
and browsers sometimes report zips as application/x-zip-compressed
.
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.