Comments (21)
What language is the bot in?
from halite-ii.
I've asked him here: https://forums.halite.io/t/bug-update-map/118/3
from halite-ii.
Python
from halite-ii.
game.update_map() works for more than 1 second
и я сбой с тайм-аутом
from halite-ii.
- and I'm crashing with a timeout
from halite-ii.
Does default bot work? Or is this default bot failing as well?
from halite-ii.
the standard bot is working. this error occurs when a large number of ships are simultaneously on the map.
from halite-ii.
@j-clap can you take a look at this?
from halite-ii.
Can we get a full traceback of the error? How did you find out this is caused by update map?
from halite-ii.
a_times = timeit.default_timer()
game_map = game.update_map()
logging.info(timeit.default_timer()-a_times)
at some point, it takes more than 2 seconds.
from halite-ii.
Can you post a replay here?
from halite-ii.
Replay
https://halite.io/play/?game_id=1847733
Log
https://api.halite.io/v1/api/user/1308/match/1847733/error_log
from halite-ii.
Judging by the profile, the readline function is to blame. Please correct!
from halite-ii.
One theory would be that the bot didn't send move instructions for one of the turns, so backend isn't sending new map to the bot, so client is stuck waiting for the map from the backend. This assumes no bugs in either backend or python client :P
from halite-ii.
Also, readline just reads the line. I mean I could use the c version here, but considering that 2 of the other 4 bots in the game run the same python library and none of them timed out, it's not very likely it's the library...
Could you send me your code so I can take a look?
from halite-ii.
I would propose adding check to standard kits that "you ran map update without sending move commands first", regardless of what happens in this issue.
from halite-ii.
@snaar That sounds like a good idea.
from halite-ii.
@snaar it seems so it is.
just send a message when waiting for more than a second
from halite-ii.
It sounds like you have figured out what is wrong and fixed it. If that is not the case, please reopen and we'll try to figure it out.
from halite-ii.
I also noticed game_map.update_map()
taking a long time to run. I suspect that the sys.stdin.readline()
is blocking until it gets input from the halite engine causing the measured execution time from the perspective of the bot to be too much. Surely the engine counts the "turn time" as starting after the new game state is sent to each bot.
from halite-ii.
The game_map.update_map()
call actually includes the remaining processing time of all active opponents! Whatever you do, do NOT include it in your timeout measurements! This was non-intuitive for me as well, and was stuck for a good couple of days with issue #248 .
from halite-ii.
Related Issues (20)
- Paused challenges HOT 8
- Incorrect winner ID stored in challenge JSON
- Challenges transactional emails HOT 3
- Auto refresh game feed on profile page HOT 3
- Set canonical URL for 2016.halite.io HOT 1
- Prepping for post-competition HOT 4
- Prepping for finals HOT 8
- nav responsiveness needs update HOT 2
- Error message when user tries to submit 4th challenge in a day HOT 2
- Halite TV bugs HOT 3
- 4 player challenges can still play 2 player games HOT 4
- Set up Google cloud for team project prototype HOT 3
- What are essential components to mimic the whole thing. HOT 1
- Sample code for javascript bot doesn't run
- UI Changes for finals - Jan 22nd when submissions close HOT 2
- UI Updates for when finals close HOT 1
- Backend updates for Finals
- Forum comment on PHP bot
- Halite TV Pause/Unpause Button HOT 1
- hamburger menu won't open HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from halite-ii.