Microbattle Agent modeling - simple, flexible, and connected

We want you to put your ideas into code. For the moment, let's narrow the discussion to ideas you have about how to play a game -- theoretically any game, although we only have a few available here.

You know what your game-playing strategy ("agent") should do, and you want to code that. We presume you don't want to learn some other language, deploy an application framework or an SDK, or understand how threads work (if you don't already). And we don't want the hard part to be finding other agents to play with. Those tasks are all operational overhead, and we all have enough of that in our lives already.

That's why we're building the online arenas you see in this site. Truck is real-time strategy; the Prisoners Dilemma is a famous game-theory model. Programming an agent in a game can be as simple as typing the code into your browser, although we hope you'll get hooked and write more competitive agents and upload them for your own use. Maybe you'll even license them to others.

Microbattle is built on these five principles:

Meritocracy. Well-defined tasks -- like those in games -- make it easier to identify good code. Good code is valuable. Like a great song, a great function can come from anyone, even people that have never written anything you've heard of before. We want to connect one person's function to other people who need a good function.

Good breeds better. The great thing about games is that we can foster friendly competition between functions. An agent is judged against its peers. As better agents are written, that raises the bar and encourages you to write even better agents.

Language of your preference. A lot of good ideas go unscripted simply because the person who has the idea doesn't know the scripting language required. For example, you might have a really good idea for the behavior of an NPC in a game, but the game only runs Lua scripts. You don't know Lua, and you probably aren't going to learn it just to write one program. You should be able to write the behavior anyway.

Zero deployment. You should be able to script a program and run it immediately. Languages and libraries are typically powerful but usually require you to install dependencies and configure environments. For the casual programmer this is unacceptable. We think that, for most people, the days of deployment overhead are on their way out. A Hello World tutorial should be one line long.

Literate code. The agent code should be easy to write well, and easy to read. Our APIs are crafted to encourage that. A bad API might force agent code to store state in out-of-the-way places and write repetitive boilerplate code. We use a blend of coroutines and event handlers to keep agent code straightforward, as much a stream-of-consciousness expression as possible. For details please see interruptible coroutines.

As noted elsewhere, Microbattle is a work in progress. We hope you let us know what you think. Have fun.