60 points · by vyrotek · 16y ago · 40 comments
I know there are many open source projects that let you build and compete in these sort of things, but they always seem to be language specific. You can't battle your Java AI against your C# or Python AI. So, what if we all settled on a common language such as JSON & REST? And what if we made the game persistent?
The idea is this. A cloud hosted game which is persistent but allows new players to join or leave at any time. To participate you only need to register an account and give it a base URL of where you are hosting your player's AI logic. There would be some documentation on the expected REST URLs that need to be available. This lets you use any language you want to participate. It also allows players to have a database to store past moves or data about the environment. The game server could manage invoking the player's AI based on a turn system or in real-time when needed. A player's AI while waiting for a 'turn' could invoke service calls on the game server to 'look around' and learn about the environment.
The visuals would obviously be basic at first and should be displayable on a webpage.
The game itself could be as simple as a 'player' moving and shooting when it detects another player. You could introduce items, weapons, etc.
Or it could be more complex and similar to this (posted on HN not too long ago): http://phonons.wordpress.com/2010/06/01/cells-a-massively-multi-agent-python-programming-game/
Does something like this exist?
(For example, in a beautiful simulation where a single program had to control a colony of ants who did not have any room for state other than a current instruction pointer and the input of their senses, someone successfully identified an algorithm to have each ant figure out which ant they were, and then execute a pre-planned sequence of moves to wall in the entire enemy base, faster than any non-degenerate program could possibly counteract it. It was beauty to behold but it also crushed the life out of the community -- the best ant has been crowned, everyone else gets to play for second best.
With luck you eventually discover chess or Go: a game with no obvious degenerate case in the rules. But that takes lots of design work.
My suspicion is that writing AIs is so much work, and the player base is so rarefied, that there's not quite enough energy to support a game that evolves quickly enough to be constantly escaping from the degenerate case of the week, wandering through game-design space in search of the next chess. But I suppose that could change. There didn't used to be a core audience for a card game whose rules and cards changed constantly, but now there apparently is.
(Or possibly what I think of as the "finite halting problem" somewhat colloquially; a system that isn't actually Turing Complete because it's finite and bounded, but shares "enough" aspects of Turing Completeness that it still means that it's completely computationally infeasible to "prove" the property in question in the real world. Technically the halting problem on real computers falls into this class, a program running without IO is technically on a finite state machine but you're still not going to solve even that halting problem in a world where the bidding opens at 4GB of RAM.)
The hill (when Corewar is played king of the hill style on the internet) could be considered the environment. Of course different kinds of hills could be envisioned, for example arranging warriors on a grid.
It does have the problem of playability. How do you keep someone's interest beyond a week or two of this?
My thoughts on the subject have lead to something like this:
Create a fairly persistent world. This means that any action a player can make will be permanent in the game. It can be something fairly simple, a grid based game, maybe some resource management. I like the idea of a turn based strategy game, with ~30s per turn.
Create a point system. How points are won doesn't really matter, but make it something interesting. Point reset every week. When they reset, the person with the highest amount of points gets to make a new "rule". This could be anything from a new ability for a unit to a change in the way the physics work. It (obviously) has to be tested and verified, but would be deployed relatively quickly. This process iterates for as long as desired.
Obviously a number of iterations will cause problems of complexity eventually. My thoughts on the matter have led me to a rather specific idea for a game of this type, which I think would be incredibly enjoyable to play.
If you're interested, send me an email. I'd be happy to send you a more complete description of my idea, and if you still like it I'd be up for trying to implement it. That is true for anyone, not just the OP.
It becomes a competitive advantage to win early for express purpose of introducing protectionist mechanisms that would favor your particular technique or more likely, blocking the approach used by one's greatest challenger.
This may degenerate to "dirty tricks" early for the sake of an early win.
Therefore, to counteract that tendency:
Consider an "evolving" world. Take a card from artificial life techniques or randomly permute some attribute of the environment; e.g., terrain might become a more rocky, introduction of a natural predator, or perhaps switch from land to sea.
Mythology is rich with scenarios to draw upon.
I'd recommend NOT revealing the change until the round begins! Between rounds, let participants experiment only with the previous iteration of the world.
http://metavore.org/faff/Botlife.txt is the sketch of what I came up with there.
The main novel aspect would be that it is essentially an MMO, but there is no direct control ability; you can only upload new programs to your robots.
1) The goal is primarily to gather/produce resources, not to actually force combat. Combat is one strategy that could prove beneficial (since you avoid the cost of mining/production by just taking it from their wreckage), but with minimal effort, you should be able to outrun/avoid most of these 'pirates'.
2) By employing some sort of hosted code, you can organise some sort of a market for code snippets/components, encouraging people to share what they have done in a variety of ways, on teh basis that profitting from it being used by others outweighs the cost of others using it against you.
3) It doesn't need all that complexity to start, or even in the same game. But the complexity helps to some extent by making it harder for a single abusable game mechanic to control the whole system. Most people will focus initially on developing a good (or just workable) solution to a single aspect.
You would write all the logic of your car in a single C program and then race it against others. It had a visual so you could watch the race or just see the results. At the time I thought the physics engine was pretty realistic, not sure what I would think if I went back to it now though. It was a blast to play with friends.
I started working on something very similar to what you describe a few months ago because it's a fantastic idea that I don't think has been implemented well in a while. It was Java-based but the idea was that you had a team of robots with 64k RAM and a simple CPU. You could configure robots with different types of equipment, (radios, weapons, sensors, etc.) that would be mapped to memory locations for control.
To play you'd write an assembly-language program to control the robot and set it loose on the world.
You could write compilers and such to compile down to the robot machine language if you wanted to get sophisticated.
Each "round" would consist of running one machine cycle for every robot in the world.
The problem I ran into, other than not having enough time to work on it, was that you could really go down the rabbit hole on "realism." For example, the radios; should I implement actual antenna propagation patterns and delays, or should a transmission just be instantaneous and recievable everywhere?
There's a tradeoff between realism and fun, and between limitations of the world and longevity. If you make it too limited, you end up with gameplay that essentially favors a single strategy. If it's too complex, only the most hardcore players will put in the effort to play. I think this is a fundamental problem with a game like this.
Maybe something like this would be fun and accessible if you eliminated the competitive aspect of it.
Edit: if you decide to pursue this project and want some (intermittent) help, send me an email at [my username]@gmail.com
I would definitely play an MMO which let me script and didn't require my realtime involvement. EVE Online is like that for some of the gameplay already, but something where everything is through "agents" would be even better.
You could open source it and just expect someone to pick it up and host it somewhere for others to play on. The advantage is the host could make modifications to the game mechanics itself (just like any other game).
The alternative would be to develop the server with the 'cloud' in mind. Meaning, there would most likely only be one large game server that perhaps managed 'instances' of matches. The advantage here is that you avoid fragmenting an already small pool of players.
It would have to be turn based otherwise latency would make it very unfair. Which of course would mean that efficiency wouldn't be part of it much (there would have to be a timeout of course, but you still wouldn't usually be able to get an advantage by optimising your code to run really fast).
Having them run on other machines would also mean that collusion and such between bots would be a possibility if you had games with more than two players. I think you'd just have to accept and embrace it.
I'm up for getting involved if you want to make this. Email is in my profile.
Possibly something like 30 seconds to 1 minute turns with allowing the server your querying maybe 5 seconds to return moves. Then you would just need some way to assess progress. I like the idea to the people can get beaten relatively fast, just the idea that everyone starts out on a massive map and bigger civilisations soon start to form by wiping others out.
Closer to realtime too (rather than a huge multiple) - which would make close to 24x7 interaction necessary, requiring automation, teamwork, mobile device interfaces....
Damn - yet another project to think about :-)
Edit: I've just noticed that they are trying to encourage the development of nuclear war fighting bots within Defcon.
I know WeeWar has an API, but that is probably not the kind of game you have in mind. I think you mean long running simulations with agents trying to survive.
There might even be one by Microsoft, not sure if they are language agnostic, though.
I think there is still room for interesting worlds of that kind.
I also wondered if Microsoft had anything in this realm. The thought of company sponsoring the server would be interesting as well. We might be able to get their attention if the central server was written C# and deployed Azure. I have experience with both technologies :)
I definitely think this concept would have legs. Even for an MMO where you could make a rudimentary party and go do something if the rest of your play group were asleep during the middle of the day.
Interestingly the ultimate winning strategy was a herbivore that acted even more aggressively than a carnivore. Any carnivore that wantonly killed everything would also be wasting its food source, but a herbivore has no such limitation. Someone programmed herbivores that formed packs to attack everything & keep the plant for themselves, and it was impossible for anything else to gain a foothold once bugs with that strategy were in a terrarium.
Terrarium 2 with source on codeplex.
If you limit the number of API calls per minute to something reasonable, should be scalable, too.
The description, from the website: "Robocode is a programming game, where the goal is to develop a robot battle tank to battle against other tanks in Java or .NET. The robot battles are running in real-time and on-screen."
You can't battle your Java AI against your C# or Python AI
In things like realtimebattle and the recent Google AI competition, you most certainly could. This is usually accomplished by routing all commands and their results via the command line.