Live data from Hacker News

Battlesnake – Competitive Snake Games over HTTP

play.battlesnake.io

41–50 of 55 posts

Re: Battlesnake – Competitive Snake Games over HTTP

#41

Looks very cool! I have a question - with AI nowadays that can dominate pretty much any board game - is there any hope for anyone 'hand coding' a strategy here against someone who just trains an AI model. How does the problem space change in a game such as this where it may be 1v8 opponents vs a 1v1 game such as chess I wonder

Some competitions like this only give you a certain amount of "cycles" per turn, so hand written solutions would have an "advantage" in that sense. I don't know if that method is applicable to this particular game though, since the processing is done by the user.

From what I found in their documentation, the limitation is latency. Your server can use whatever compute cycles it wants to formulate a decision for a single turn, but if it doesn't respond with sub 250ms latency then the snake just carries on in its current direction instead of making a move that turn.

Re: Battlesnake – Competitive Snake Games over HTTP

#42
post #2

Just curious, what would be the best hosting option for beginners to use for their snake API server?

All the options other people are suggesting are good, but if you host on Google Cloud Compute's us-west1 region you'll get very low latency as that's the region from which they send the HTTP requests.

Re: Battlesnake – Competitive Snake Games over HTTP

#43
post #37

For those that clicked thinking there be an actual multiplayer snake game over http: slither.io Be warned, this can ruin productivity in your day.

We ran a hackday where we attempted to build a multiplayer snake over websockets using Django channels. I don’t think I touched on it in the write up, but websockets/tcp is the wrong choice for this kind of game.

Write up: https://devblog.kogan.com/blog/kogame-django-channels

Game: https://kogame-snek.herokuapp.com/

Disclaimer: it’s not very good. It was a one day project.

Re: Battlesnake – Competitive Snake Games over HTTP

#46
post #37

For those that clicked thinking there be an actual multiplayer snake game over http: slither.io Be warned, this can ruin productivity in your day.

We ran a hackday where we attempted to build a multiplayer snake over websockets using Django channels. I don’t think I touched on it in the write up, but websockets/tcp is the wrong choice for this kind of game. Write up: https://devblog.kogan.com/blog/kogame-django-channels Game: https://kogame-snek.herokuapp.com/ Disclaimer: it’s not very good. It was a one day project.

I'm surprised that Websockets is the wrong choice. What would be the right choice? WebRTC?

Re: Battlesnake – Competitive Snake Games over HTTP

#47
post #9

Does anyone have a list of competitive programming challenges like this? Specifically where you're programming a board game against other algorithms. Googling "competitive programming challenges" doesn't yield a lot of good results. I'm aware of http://fruitbots.org/ , which I had a lot of fun with.

Vindinium[1] is another fun one. It looks like the original game service is now offline but the server code is open source.

[1]: https://github.com/ornicar/vindinium

Re: Battlesnake – Competitive Snake Games over HTTP

#48

Earlier quoted context omitted.

We ran a hackday where we attempted to build a multiplayer snake over websockets using Django channels. I don’t think I touched on it in the write up, but websockets/tcp is the wrong choice for this kind of game. Write up: https://devblog.kogan.com/blog/kogame-django-channels Game: https://kogame-snek.herokuapp.com/ Disclaimer: it’s not very good. It was a one day project.

I'm surprised that Websockets is the wrong choice. What would be the right choice? WebRTC?

Yes, UDP is needed, otherwise you get lockups. We incorrectly attributed rendering delays to react rendering rather than TCP.

Re: Battlesnake – Competitive Snake Games over HTTP

#50
post #49
post #4

I just realized that a multiplayer Snake is basically the TRON racing game played on a discrete grid.

I remember playing xtron in the office maybe 20 years ago. https://screenshots.debian.net/package/xtron

Cool, I'd love an xtron (or waylandtron ;)) legacy, 3D with multiple levels... hmmm...
Post reply on HN