rdbrck / bountysnake2018 Goto Github PK
View Code? Open in Web Editor NEWSon of Robosnake: Redbrick's bounty snake for the Battlesnake 2018 AI competition
License: MIT License
Son of Robosnake: Redbrick's bounty snake for the Battlesnake 2018 AI competition
License: MIT License
The official game board lets you run a suite of 14 unit tests against a snake URL and verify that the behaviour is correct.
We pass 13 of them, but are failing one. The error we get is Failed: Your snake collided with one of the walls when there was move that would have allowed it to have survived.
In this scenario, we have a tiny board (3x1). Robo is length three but all body parts occupy the same tile at [1,1]. The enemy is only length two, occupying [1,2],[1,3]. The expected action is for Robo to move to [1,2], generating a head-on-head collision and winning because we are longer than the enemy. However, Robo doesn't recognize that as a valid move and instead falls back to the emergency fail-safe (always go left), going to [0,1] which crashes into the wall.
The move JSON for the failing test is as follows:
{
"you": {
"taunt": "I make mistakes growing up. I'm not perfect; I'm not a robot. -Justin Bieber",
"object": "snake",
"name": "Son of Robosnake",
"length": 3,
"id": "81bbdfa7-901b-4018-a86a-f8253dc9af32",
"health": 100,
"body": {
"object": "list",
"data": [
{
"y": 0,
"x": 0,
"object": "point"
},
{
"y": 0,
"x": 0,
"object": "point"
},
{
"y": 0,
"x": 0,
"object": "point"
}
]
}
},
"width": 3,
"turn": 0,
"snakes": {
"object": "list",
"data": [
{
"taunt": "",
"object": "snake",
"name": "",
"length": 3,
"id": "81bbdfa7-901b-4018-a86a-f8253dc9af32",
"health": 100,
"body": {
"object": "list",
"data": [
{
"y": 0,
"x": 0,
"object": "point"
},
{
"y": 0,
"x": 0,
"object": "point"
},
{
"y": 0,
"x": 0,
"object": "point"
}
]
}
},
{
"taunt": "",
"object": "snake",
"name": "",
"length": 2,
"id": "f599c176-f241-4156-bd68-59ae1ab94045",
"health": 100,
"body": {
"object": "list",
"data": [
{
"y": 0,
"x": 1,
"object": "point"
},
{
"y": 0,
"x": 2,
"object": "point"
}
]
}
}
]
},
"object": "world",
"id": "6875a737-4962-4525-8804-970d7df1a088",
"height": 1,
"food": {
"object": "list",
"data": [
]
}
}
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.