1. 8

    Because it is your computer that runs the code, you can use a lot of different techniques. But that also may cause a problem, because you can use any algorithm if it fits in the timeout given. This means that if you have the hardware for it, you could train a neural net with 1M parameters and run it against others. You would probably win, but at a cost. Basically, I think that this could create a pay-to-win problem.

    1. 5

      I personally support anyone wanting to solve this game using machine learning, because that’s an interesting problem in itself, as long as they keep it from impeding/discouraging beginners :-)

      They have multiple divisions in the tournament (Beginner, Intermediate, Advanced). While that is not a perfect solution, because you can’t enforce it, in practice I think anyone training a neural net would take that to the Advanced division where it’s fair game and go for the gold. The Battlesnake community is full of friendlies and I doubt anyone would take that level of bot into the beginner’s division, which would just be blatantly unfair, and not really worth the Beginner prize in a tournament anyway. In Advanced, there’s still going to be a cut-off point where the cost of your hardware grows past the potential of winning a prize, and even then, there’s enough random chance in the game that it’s not a guaranteed win.

      1. 3

        If this ever became a legitimate problem, you could say “You must run your code on a Raspberry Pi” or “Your code will be run in a docker container with certain resource limits set”.

        1. 2

          The problem is that then you cannot enforce such requirements using what they have now, and moving to Docker containers could open remote code execution problems, which are hard to deal with, because sandboxing is hard. There is no universal solution. CodeCombat solution is to have their own language subsets, which they then can control how are executed. Obviously, the techniques are then limited.

          1. 2

            The engine is open source and you can easily run it on your own network. So if you want to, you can host your own event where everyone brings a Raspberry Pi to run on.

          2. 2

            This seems like complaining that surfing is pay-to-win because some surfers can buy better boards. It’s not strictly incorrect, but it appears to be a great distance away from the point of surfing.

          1. 3

            Agree 100%. The first time I wrote my own Ruby gem, I was thrilled that the tests ran in a fraction of a second - unlike the Rails apps I’d worked on. I could run the whole suite after every change and feel very confident I hadn’t broken anything, and I never got distracted waiting for tests.

            Since I’ve bee working in Elixir, I’ve really enjoyed how little effort it takes to make tests fast and concurrent. It’s a big productivity boost. The only slow tests I’ve seen were some that fired up a headless browser.

            1. 1

              Elixir/Phoenix are also the only language/framework pair I work in* where it’s easy for it to be concurrent and fast with end to end testing too! (see here for inspiration)

              *I’m sure it’s possible in many frameworks, but I haven’t found a comparable way in Rails for sure