Hacker News new | past | comments | ask | show | jobs | submit login
Battlecode – AI Programming Competition (battlecode.org)
143 points by dgellow on Oct 7, 2016 | hide | past | favorite | 36 comments



If anyone is interested in more of these, I'm trying to keep a list here. https://github.com/dakaraphi/development-resources/blob/mast...


I wrote a Lua based programming game more than 10 years ago. You can look at it here: http://infon.dividuum.de/. Source code is also available on github: https://github.com/dividuum/infon.

It was used during multiple local hacker conferences to keep the guests entertained. For that you would run the server somewhere, then run multiple viewers all over the place (and a big central screen) so everyone could follow the current game. Players would then connect to the server through telnet and upload their Lua code. Code could be updated while the game was running so people kept tweaking their code all the time. It was really fun seeing more than 20 player competing.

The game should still work today and is basically feature complete.


Nice list but you are missing my favourite:

http://www.rpscontest.com/ is a rock paper scissor competition. All contestants are readable; very fascinating stuff.


Cool concept, thanks for posting. I am reminded of information theory pioneer Claude Shannon [1] who created a machine [2] to play the Penny Matching Game, essentially guessing heads or tails chosen by the opponent. [1] https://en.wikipedia.org/wiki/Claude_Shannon [2] http://seed.ucsd.edu/~mindreader/MindReader.pdf


Screeps (https://screeps.com/) is an amazingly great example of this sort of game. It's available online, on steam, and as it works in JavaScript you can use almost any language due to the huge variety of transpilers. It has numerous constraints that make the game more interesting including CPU and memory limits.


Also battlebots. But I always preferred the old corewars/redcode


Thanks for posting the list. I call these programming games for lack of a better name, some of them go way back (e.g.: Core War) [1]. I remember playing Robowar [2] on toaster macs way back when.

[1] http://www.retroprogramming.com/2009/09/history-of-programmi... [2] https://en.wikipedia.org/wiki/RoboWar


I enjoyed playing corewar so much I wanted to reimplement it on Linux.

I ended up never finishing it because I found myself inventing Google Wave (in 1997, in DOS). But it was a fun project.


> I found myself inventing Google Wave (in 1997, in DOS)

What was the project? Something you ever released?


It was never released. I wrote the consensus protocol only to discover the challenges of TCP/IP in DOS.


I've built two niche games as AI programming games in ruby: Bang!: https://github.com/KevinMcHugh/mustached-nemesis The Resistance: https://github.com/KevinMcHugh/secret-nemesis

I'd like to find a community to share these with but have no idea what these things are even called.


Another one is https://github.com/ryanb/ruby-warrior/tree/master. You can see the AI I built for it long ago at https://github.com/akkartik/brooks-ruby-warrior.


I think it'd be neat to have a coordination service that runs tournaments for AIs playing games like Resistance. People register a URL with the service that exposes an API that lets the coordination service tell them the current state of the game, and responds with their next move, if any. People could then write these AIs in whatever they want (and bear most of the cost of running them for tournament style simulation).


You might be interested in http://vindinium.org It has a REST api so it doesn't matter what language you write your bot in.


it wouldn't be difficult to adapt my existing codebase for that. It would probably have to involve webhooks or websockets, and games would play out a lot more slowly than doing it locally with gems. As is, playing 10000 games only takes about 45 seconds. Running across the web is going to slow that down significantly


Necessarily turn-based then? Otherwise low latency would be an advantage


This reminds me of Codingame, they have a similar challenge where you code an AI for a Dice Wars-like game and send it off to the ladder to compete against other people. It's great fun


I love codingame! I looked into it before recommending it to a friend and got all sucked in. I'm currently working on an AI bot there for a competition. It's fun and forcing me to go do research on AI concepts.


If anyone is interested in learning more specifically about the Battlecode competition, I wrote a blog post giving a brief overview of the competition a few years ago: http://cory.li/battlecode-intro/

Also, we open sourced our winning 2012 bot on bitbucket here if you want to see the type of code that goes into it: https://bitbucket.org/Cixelyn/bcode2012-bot


Sweet fancy Moses why is MIT still requiring Adobe Flash Player to watch the results in 2016?

In any case here is a link to the finals on YouTube which works with mobile devices:

https://m.youtube.com/watch?v=4ruUyCbhnWg


The "watch" links let you watch the actual battle simulation results in a really old viewing engine written almost 6+ years ago in Adobe Air. It was amazing at the time since you didn't have to install the full Java client just to view the matches.

The devs probably have their hands full implementing the actual game -- pretty sure no one has had time to port the codebase to something more modern. The competition organizers are primarily MIT students doing this in their spare time, so they have classwork and other things to deal with as well. :)


Wow, this reminds me of GISMO from 1991 or so. Teams of 8 tanks, 2 bases, terrain included water, mountains, forests, and plains. Implemented in dos and required a modem to compete.

Neat framework, well before it's time, very few competitors that worked. They resisted the recommendation to support TCP instead of modems and linux, even after it was ported.

It was modeled after the M1 abrams as part of a research project in AI controlled teams.

I tinkered with it, I liked it because the terrain was complicated enough to lend itself to quite a few strategies. I've not seen anything similar since.

http://stars.library.ucf.edu/istlibrary/104/


Cool! Reminds me of something that I did http://javier.xyz/clashjs/ a JS AI battle game :)


Shameful plug: with a few friends we are planning to create another platform for such fun games. If you think it is a good idea, please sign up: https://www.botolympiad.com/


Is that a remake of the Google AI Challenged that ended after the awesome ant game?


Battlecode was MIT's first AI competition (started back in 2000). It's been around before the Google AI Challenge.


What awesome ant game?


This one: http://ants.aichallenge.org/ I greatly enjoyed it, and it taught me Python. I keep checking back in the hopes someone will get a new competition together.


Are there competitive AIs generated by machine learning? Or is it all custom coded?


It's generally custom, although we've had teams use ML strategies to tune their bots in the past. (I'm one of the people who runs this competition).

We impose tight runtime limits on the code your AI can run - generally limiting the number of bytecodes the JVM can execute per turn per robot. This is partly pedagogical; it kinda-sorta simulates embedded programming, like for a real robot. It's also practical; it keeps people from accidentally DOS'ing themselves or our servers with infinitely-looping AI.

On the other hand, 20000 instructions per turn doesn't give you much leeway for, say, matrix multiplication, so most sophisticated ML isn't possible at runtime. You can do simple things, but they have to be tightly written.


What does it mean that "supported programming languages are Java and Scala"? Are other JVM languages allowed?


Other JVM languages are technically allowed, but AFAIK they generate way too much scaffolding & reflection-based flow such that you end up burning your entire bytecode computation budget just in calling one or two functions.

So yes, you could probably use Jython or Jruby, but you wouldn't be competitive against the people writing straight Java.


I bet Kawa Scheme performs well in that regard.


I used to play this game back in the day: http://www.mobygames.com/game/c64/omega_


"Amaze your future employer!" "Free food!"

I guess that working for free food is pretty amazing for a future employer.


This was worth reading for the team names alone! Awesome.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: