35
sendwithus presents

Battlesnake 2015 - Introduction

Embed Size (px)

Citation preview

sendwithus presents

The (Rough) Plan

11:30

12:00

12:30

5:30

6:00

7:30

Orientation (now)

Begin Coding (soon!)

Lunch Served

Dinner Served

Battle Begins!

Afterparty @ Felicita’s meals provided by VIATeC & One Net Marketing

What is BattleSnake?

“Competitive Programming Gamebased on the Arcade Game Snake.”

(that we made up… for fun and glory)

With a catch...

Teams will play on the same board at the same time.

“Killing” an opponent will absorb their snake and remove them from the game.

Last Snake Alive Wins

Tournament Format

Winners will be decided by tournament.(details announced later)

Finals will be a four-way battle to the death.

Grand Prize

$500 CashBattleSnake Swag Pack

sponsored by Heroku

Second Place

$300 CashSwag Pack

Third Place

$200 CashSwag Pack

sponsored by Heroku

Heroku Award

Zumiez Longboard!

Teams using Heroku can register atheroku.getfeedback.com/battlesnake

Dropbox Award

1 TB of Dropbox Space!

Teams using Dropbox can register atbit.ly/dropbox-battlesnake

Swag Pack Awards

Hunger Games Award (most food eaten)

Predator Award (most kills)

Never Surrender Award (longest snake)

sponsored by sendwithus and Dropbox

Questions?

BattleSnakeGame Rules

Game Objectives

Eat food. Don’t die. Consume others.

Food will spawn randomly around the board.

Eating food will increase snake length by 1.

It will also reset your Life to 100. (see next slide)

Eat Food.

Don’t Die.

Ways to die

Run into a wall.

Run into yourself.

Run into another snake.

Life reaches 0. (You must eat at least every 100 turns)

Consume Others.

If a snake collides with you…

You consume 50% of their length, and they die.

Head-to-head collisions are won by the longer snake. Same length == You both die.

Objectives Recap

Eat Food. You must eat every 100 turns.

Don’t Die.Avoid walls, other snakes, and yourself.

Consume Others.Last snake alive wins.

Questions?

Writing Snake AIs

How does it work?

Snakes play the game over Web API.

Each team will provide a URL that responds to HTTP POST requests.

(you will be writing and deploying a web server)

Snakes respond to three commands

POST /startPOST /movePOST /end

POST /start

Request{ “game_id”: “hairy-cheese”, “width”: X, “height: Y}

(signals start of new game)

Response{ "name": "Noodlez Galore", "color": "#ff0000", "head_url": "http://server.com/head.png", "taunt": "Let's rock!"}

POST /move

Request{ “game_id”: “hairy-cheese”, “turn”: 1, “board”: <BoardState>, “snakes”: [...], “food”: [...]}

(make next move)

Response{ "move": "down", # “up”, “left”, “right” "taunt": "go snake yourself!"}

POST /end

Request{ “game_id”: “hairy-cheese”}

(signals end of game)

Response{ }

Snakes must respond with HTTP Status 200.

Servers have 2 seconds to respond.

Errors or timeouts will move snake forward.

Other Technical Stuff

Read The Docshttp://github.com/sendwithus/battlesnake

(everything you need is there)

Questions?

Suggestions...

Don’t waste time with servers.Just use Heroku or Dropbox.

http://your-snake-ai.herokuapp.com

Suggestions...

Starter Projects Availablegithub.com/sendwithus/battlesnake

Node, Python, Java, Ruby, Go

Suggestions...

Suggestions...

Use Heroku logs for debugging.

`heroku logs --tail`

or Papertrail add-on

Suggestions...

Use NGROK for local testing.

ngrok.com

(read docs or ask us for help)

Live UI Demo

Need Help?

Read The Docsgithub.com/sendwithus/battlesnake

Ask Anyone Wearing‘sendwithus’