228 points · by phreeza · 16y ago · 106 comments
I'll be looking at the source soon, but in the meantime I'm curious to see if other people would be interested in playing this. There could be a repository of genomes/tribes you can download and compete against, or perhaps this would be done server-side so your tribe's genome couldn't be cloned?
As a side note, it seems to me that (unless cells can be aware of their comrades' positions) global position needs to be availible in order to build walls, which is damn cool.
Cheers!
>As a side note, it seems to me that (unless cells can be aware of their comrades' positions) global position needs to be availible in order to build walls, which is damn cool.
I don't think so. All global position tells you is "how far away are the boundaries of the map?" Unless there's something I'm missing, you can get everything else just by keeping track of "offset from where I started".
As another side note, restricting messages to integers seems pointless, since arbitrary information can be uniquely encoded as an integer given enough ingenuity. It's a problem that would get solved once and then just irritates people instead of actually constraining solutions. (I assume python integers are only bounded by available memory space.)
Limiting them to n-bit integers, where n = 4 or 8 for example, would be more pointful, but again I think it would probably only make a particular behaviour harder to implement, not significantly limit the set of behaviours that are possible to implement.
Concerning the integer vs bit, that was what I meant, was still thinking in terms of C ints. An even more extreme version would be to force the agents to store their state in a similar manner, but I think that would be taking it too far.
> ladder-server, too, where you submit your tribe and it > enters into a perpetual tournament and gets ranked
That would be too cool. I'd love to see this happen. I wonder what kind of market there is for something like this.
EDIT: I'm going to be looking through the code more today, though right now I am going through finals at college. I don't want to promise anything, but this is something I could see myself contributing to, if you'd want (though now might not be the time so early in the process). Shoot me an email (in profile), if you'd like to be in touch.
Documentation is nonexistent, sorry for that. That was the first thing that came to mind when I saw that this hit the front page, should have thought of that earlier.
I'll go through and comment it though, this resonance has given me a big boost in motivation.
May I recommend Microsoft's TrueSkill algorithm for ranking genomes? There's C#[1] and Java[2] implementations available. Full disclosure, I have no association with Microsoft Research, but I am the author of JSkills.
[1] github.com/moserware/skills [2] github.com/nsp/jskills
Lisp vs. Python would be most interesting if cells could pass arbitrary information to each other. This would make it easy for Lisp cells to modify their own code. Cells signalling each other and querying each other's information would enable interesting interactions. Some sort of sand boxing would seem to be desirable.
2. Python cells could modify their own code just as easily (if not easier) than Lisp cells.
I'm not expert on the topic, but what do you mean by easier ? By using eval ? Is it really easier than altering an expression tree stored in a list ?
After all, most of your APM in a game like Starcraft is going toward things that you could replace with a very small shell script. Although I can't argue with success, it's always felt silly to me that a big part of the game is just building enough intuition and reflex so that you can actually spare your mind to think about the interesting parts. If you can simplify the reflexive pieces at "game-time" while keeping them interesting in a different way, that might leave you with a game that's even deeper strategically.
However, it would be a difficult exercise to make an RTS that was dynamic enough that some folks with a lot of spare time didn't just write "ultimate" AI for all the units that is close-enough-to-perfect, and distribute that to all lazy players. Perhaps one might establish limitations on the resources or length of scripts you can write, so that it's difficult to write a script that is simultaneously effective for strategy A and different strategy B, and you need to specialize your code based on your style of play.
Interestingly, Core Wars is from the age of multiple threads running on a single processor, sharing memory, whereas the more recent Cells represents a share-nothing distributed system with autonomous agents.
EDIT: my fork also cleans up a couple real issues, including letting the game run properly when psyco's not installed and allowing the user to specify minds on the command-line (albeit in a hacky way).
[link redacted]
Here is a video (sorry using Quicktime which only grabs the whole screen and not a window) of evolving_chaos v.s. ben which is fun to watch http://www.youtube.com/watch?v=Zy_-4rRmOCc
File "cells.py", line 205, in get_view
next
NameError: global name 'next' is not defined(had to patch the math.copysign() in the original version as well, as it only exists from 2.6 on)
Edit: works with continue.
As I searched for a link, I discovered that there's a newer version out just 2 years ago. [2]
[1] http://www.devhood.com/tutorials/tutorial_details.aspx?tutor...
It would be cool if you could drop pheremone trails too. I'm thinking like a programmable Sim Ant
That's what ICFP 2004 was. Here's the specification, if you want ideas:
http://alliance.seas.upenn.edu/~plclub/cgi-bin/contest/ants....
http://alliance.seas.upenn.edu/~plclub/cgi-bin/contest/index...
As an aside, to those of you who are interested in this sort of game AI, you might want to look at the growing (AI sub)field of General Game Playing. The idea is to write a basic game AI that can take in arbitrary rules, "think" about them a little, and then play the game against one or more opponents. The author of the played favored to win this year's championship, Turbo Turtle, has open-sourced his infrastructure on Google Code (ggp-base), which makes it orders of magnitude easier to participate. More info: http://games.stanford.edu, http://cs227b.stanford.edu.
I'm thinking each player would submit an AI to start the game. At any point during the game players could "check-in" code (VCS-style) and cells created from that point on (via the splitting described in the article) would have this new code. Players would be allow, for instance, 2 check-ins per game. The upgraded cells would be represented by different shades of the player's color so that they could be kept track of.
I see this being useful for times when a player drastically misuses his cells initially or for an entirely different style of play (a different bracket on the ladder server).
Your code then looks at the strategy variable to see which code path to execute.
It would sound like it would be smart to start off with the extremities. Say, start off with the same amount of 100% agressive and 100% defensive cells. They mate, get a 50/50-cell, which is partly both. If a combination of 10% agressive and 90% defensive is "the secret", then the cells will eventually all become that combination in the end.
Now, the question's whether this is a tactical approach or not...
Why are you using accessor methods? If it's because you might want to change them later, you could just use a property if that unlikely event happens. There is a real cost to accessors in Python. They also add a lot of visual noise.
Why did you make an enum class (ActionType)? That adds an extra hash table lookup for not much benefit over
ACT_SPAWN, ACT_MOVE, ACT_EAT, ACT_ATTACK, ACT_LIFT, ACT_DROP = range(6)
EDIT: the performance seems fine the way it is now. I made some changes but they didn't perceptibly change the way the game plays. I am grouchy today because I didn't get enough sleep. Sorry.If this is a core feature requirement, then as far as I know your only option is to change languages to something where you can rigidly sandbox. Your nearest option in programming space would be Perl and some variant of Safe (that's a CPAN module name). Otherwise, if you can live with a gentleman's agreement, you're fine. This may make the automatic-online-matchup really tricky, though.
Another option I was thinking about for this purpose is parsing the python to make sure they don't get up to anything fishy, but I have no idea how hard a Python parser would be. My guess is very.
Or we put them into separate proceses, as swolchok suggested.
I've tried their binaries, their source (including using the SDL.Framework which was suggesting in the SuperUser link another commenter posted.)
If someone would like to port this to something a little more usable, I'd be obliged. If not, I'll be spending a bit of late June doing that.
http://superuser.com/questions/43531/installing-pygame-on-sn...
Worked great for me.
Here is a short list of open-source MMO servers we could start with: http://www.reddwarfserver.org/ http://opensimulator.org/wiki/Main_Page http://www.next-gen.cc/
I would WAY rather do this than go to a movie or play videogames. I mean think of all the programming you would learn and get good at. After playing video games I just feel tired and my fingers hurt.
Let me know if anyone wants to help me organize something like this.
http://news.ycombinator.com/item?id=1395513
One cell per core? Ah, the future...
http://groups.google.com/group/cells-game-users http://groups.google.com/group/cells-game-devs
I built a bot for it once: http://github.com/akkartik/brooks-ruby-warrior
I bet I'm not the only one who's excited and would love to contact you about this!
Edit: even better to contact me through github though.
What do you people think about such games being made commercially? (indie ofcourse)
http://www.gamerz.net/c++robots/
I've got a robot "on the hill" and it's great fun.
I might be blunt, but I'm not trying to be rude on purpose
Yes.