Giter VIP home page Giter VIP logo

bountysnake2018's People

Contributors

eburdon avatar joitng avatar smallsco avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dachenscratch

bountysnake2018's Issues

Failing Unit Test

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": [
      
    ]
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.