Hacker News new | past | comments | ask | show | jobs | submit login
Automata: Like the Game of Life, but with violence (automata.website)
165 points by wayspurrchen on Nov 9, 2014 | hide | past | favorite | 69 comments



This game is quite different from Conway's Game of Life because it's not deterministic. During a turn, cells will rely on Math.random to find whether to move or divide; the direction that the cell move into is also randomized.


I agree, you can call it cellular automata if you want but it is false advertising to draw any comparison to Conway's Life. Still, it is fun an interesting but I would have found it more compelling if it didn't have a random component. That's part of the magic of Conway's life that complex results arise out of simple, deterministic rules.

FYI: There have been many competitive versions of Life written over the years. Here's one: (Life As War)[http://www.ctrl-alt-dev.nl/Projects/LifeAsWar/LifeAsWar.html]


"There have been many competitive versions of Life written over the years."

Mistaking "Conway's Game of Life" for "Cellular Automata in general" can produce sub-optimal results. The same thing that makes Life so interesting is that from its simple rules, extremely surprisingly things result. In some sense it is in the class of maximally interesting "suprisingness" as it is Turing-complete. But this same surprisingness and the wolly, humanly-unpredictable way it manifests make it almost entirely useless for game playing.

The general idea of cellular automata can be turned into game form, but you're better off defining your own rulesets, which can produce things like http://chir.ag/stuff/sand/. I also remember playing a game that actually resembles the linked page, but where each player moved a mouse cursor around, the cells tried to follow each corresponding player's mouse cursor, and the various blobs would eat each other. Probably one of the most clear examples of a game I god good at (relative to my opponents) and couldn't even begin to verbalize my strategy, even though I had one.


The Powder Toy, more or less the state of the art in falling sand games now, has a raft of Life rulesets. I found it quite interesting to pit them together; they have no particular rules for directly interacting with one another, but the way they take advantage of life and death and empty space nonetheless can produce some fascinating interactions anyway.


To illustrate this, I made an extremely simple demo that's roughly the same in execution: http://jsfiddle.net/mkq1bvp7/5/


Assuming the RNG is a deterministic random number generator, then that should make the entire game deterministic? Given independent runs, the decisions that each cell takes should occur in order, and therefore achieve the same result.


You don't know what the starting internal state of the RNG is, so no you can't predict it. The starting internal state being secret is what gives PRGs their security.


Crypto PRNGs are secure as long as their internal state is secret.

Normal RNGs are not however. A common RNG under Unix used to cycle between even / odd every other number.


> You don't know what the starting internal state of the RNG is, so no you can't predict it.

You don't need to know that. All you need to know is that it is identical to the previous run.


> You don't know what the starting internal state of the RNG is

Unless you give it a seed manually, of course. Say, 42?


Cool to watch, though this is a fairly straightforward model of complex contagion on a finite grid. It's similar to Conway's Game of Life in that there's a grid and local rules, but beyond that, the nature of the rules results in a different kind of behavior.

https://en.wikipedia.org/wiki/Complex_contagion

http://www.ladamic.com/netlearn/NetLogo4/DiffusionCompetitio...


Selfish feature requests:

+Better color scheme by default makes it easier on the eyes than full-saturation RED, GREEN, MAGENTA +Pick from existing colors to draw new cells +Time-series charts of per-color population counts +Draw on chart with default pointer instead of text select +Reset to default button

Overall this is really interesting to look at. It doesn't really seem like it's that close to Conway's Game of Life, but it's an interesting nonetheless.


reminds me a lot of an old multiplayer network game called "liquid war"

http://www.ufoot.org/liquidwar

http://www.youtube.com/watch?v=nj65vUy3rK8


I loved that game! I must've sunk countless hours playing against the AI's. For being so simple, it's remarkably fun.


Also reminds of another old game called 'Colors of War' http://colors-of-war.webs.com/


Offtopic, but ".website" is pretty much the worst TLD conceivable.


Why so?


If it's used for a website, it's redundant. If not, it's inaccurate.


You can't very well call it redundant when it's not possible to leave it off. There's no reason for a tld today. Every keyword should be a TLD, no reason you shouldn't go to http://microsoft

But given that that's not possible, http://microsoft.website would be better than http://microsoft.com except on historical grounds.

Do you know what "com" stands for? Commercial? Would you believe me if I made a convincing argument that it stands for something else - probably.


I see your point (imagine an alternate future where websites are uncommon, for instance), but I would expect that a very large number of URLs will persist and remain live for quite some time into the future. So that TLD must be viewed in a context where other TLDs

As it stands, TLDs are not used for their intended respective purposes in practice (.com for commercial, country codes, etc), so expecting this situation to suddenly change is unrealistic. I would expect, in fact, that the most successful uses of .website will be by smartasses for IRC, email, etc.


Not sure I can agree -- just as with all TLDs, it serves as a namespace. My.website isn't the same as My.webapp, which is different from My.webshop. I'm not sure any of these really are worse than My.com? In the end, it's just an alias for a numeric identifier.


Yes, they're much worse. TLDs are namespaces, not protocols or application level guides. Imagine: john@something.mywebsite ftp://something.mywebsite and so on. It makes no sense to indicate the desired protocol in the domain name. I know that for many people the 'web' and the 'net' are now synonymous but that's calcification and in the future that may simply not be true. I sincerely hope that the web is not the final word on connectivity.


I'd say if you want to email John that runs the "something" website, john@something.website is a perfectly fine email address... (as is ftp://something.website if you want to access the the something website via ftp....).

If something.website is actually not a website, then things are different. But we live with something.net not being an ISP, and something.com not actually being a commercial entity -- so I can't accept that the new TLDs are that much worse than the old ones? Not to mention the geographical based TLDs... is really "codewith.us" defined by being based in the USA?

Naming things are famously hard, and you can only have one TLD for a single "thing" (Not counting things like att.com for the commercial entity, and att.net for the ISP etc) -- if what you do is run a website (eg: medium, blogger, mypetproject.website) -- I don't see .website as being a particularly bad TLD.

All that said, I do agree with your last two paragraphs.


So it's the same as www in front?


I disagree. "www" (just like ".com") denotes a URL. Something.anything doesn't look like an address unless you put "http://" in front, which is too technical for most people. I think "www" and ".com" are here to stay.


"www" is generally taken to mean (world-wide-)web server (as opposed to ftp, gopher, telnet, smtp, imap or just "mail" server). So you could say needing both "http(s)://" and "www" is redundant.

Similarly, http://ftp.company.com is a bit of a misnomer -- if it was an ftp server, you'd have to use "ftp://" -- but of course a single host might run several different daemons, or a daemon might speak several different protocols.

I can appreciate that for many people "www" and ".com" 'denotes a URL', and also agree that without context, "Something.anything" doesn't really look like an URL. I fail to see how that's a problem within the context of hypertext (where the expected behaviour is clicking a link).

[Ed:spelling]


http://ftp.company.com makes perfect sense. It is the http listing of the files stored on the server, linking to the actual files served using FTP. FTP isn't made for dynamic content and the file list is just that. The main role of the domain is FTP serving, though.


Good example!


I'm sure the billions using the Internet won't be able to answer what "www" and ".com" stand for, but does it matter? I agree about the hyperlinks and some browsers (Safari) don't even show the URL so the domain becomes less and less important today, but on TV, print, and so on, the domain and the URL still matter and people know "www" and ".com" better than "http://", which is not shorter and is pretty cryptic as well.


Yep.


cuz everythang with a TLD is a website! and it's long!


I agree it's a strange TLD. But it's the other way around: A given TLD doesn't necessarily have to point to a web server/website at all - any kind of service could resolve this host name.


Thus the '80s .darkweb, .free, .proxy, .milquetoast .ftp3 and .test, like .ipv6eternal, did not take, as properties for future rentiers. The idea of Conway with variable local neighborhoods died hard about as fast, with a small revival when it could be done on GPU. .cytokine anyone?


Seems as if pretty much every state is a steady state. Would be interesting if some were predators and others prey, with some feature that allows them to "starve"


Watch longer. I drew a small block of pink and it took over a quarter of the board, then red swept everything.

I spent an unreasonable amount of time rooting for pink.


I coded nearly the same game as a Java desktop application in 2009. Can't find the binary anymore though. It's lots of fun if you can tune some parameters, like make one species more fertile (reproduces every time, while others reproduce only 50% of the time into empty space, etc), more aggressive (can consume when surrounds an enemy from only two sides), or more strategic (tries to make sure not to get its fighting line broken up by a lucky enemy).


I made a video on how to "win" at Automata with minimalist moves:

http://youtu.be/hQhXFHmXDaA


The big surprise to me is that stability is possible in this game. Most of these games end in less than 60 seconds. The first several games I let run had unstable dynamics: one side gained an advantage and grew and grew until it took over the whole board, usually in less than a minute. But later, through experimentation, I found that stability is possible.

The corners seem to be especially stable. I waited until the game had consolidated to 3 colors, then I created 4 new colors and added them to the corners (I slowed the game down to 500,000 milliseconds so I could have time to paint the corners, then I went back to 30 milliseconds). With 4 corners held weakly by 4 colors, and 3 large colors holding the center, the game is remarkably stable. I watched it, in the background, for several hours. One of the corners disappeared, but the other 3 corners held on. I went off to bed. In the morning, 2 more of the corners had been swallowed, but 1 of them still survived. These 4 surviving colors have been battling now for over 24 hours. The game has reached equilibrium.


Hmm in some scenarios the colours would really benefit from forming an alliance... :) It's fun to watch how different stories unfold.


If you put a 4 x 8 purple block in the center of each color, the outcome will always be purple taking over the entire map. It seems like a fairly complex, and similar tactics in Go can achieve victory (victory being purple overtaking the map).


That could be true, I won everytime I played the purple stones in Go.


Interesting. In this simulation, fighting on multiple fronts is optimal because then no single enemy can surround you. Funny. Leads to drawing along the borders being more significant than drawing within a solid colour block.


Interestingly, being surrounded (the 4x8 rectangle others have posted about) is much stronger of a position than I expected. I thought my 4x8 rectangles would be quickly consumed, but instead they expanded into enemy territory.


Sugarscape is another interesting cellular automata model.

http://en.wikipedia.org/wiki/Sugarscape


I implemented sugarscape some years ago and my findings contradicted the thesis of the book; instead of having some robust emergent results (like a Pareto distribution of wealth, IIRC), the results presented in the book could only be produced by carefully tweaking some parameters of the simulation. Furthermore, when implementing sugarscape I realized that the book didn't even specify what values were used for those parameters. While that shouldn't matter if the effects were robust, they were not. Unfortunately I don't remember the exact results, but I hope to look into this again when I have more free time. In sum, I thought the book was very interesting, but was quite disappointed when I tried to replicate (and extend) the experiments. Such is science... :-)


There is something wrong with the game, the sum of the number of cells of each color is not constant.

Also it for some reason got almost impossible to paint the board one color; beginning was easy enough. A splash was enough. Somehow the "end-game" is nearly impossible to complete. The very frustrating input method does not help the least.

Otherwise, nice idea!


You're right that there seem to be interaction rules that are not stated in the tips. If you play a long game, then new pixels added later in the game are wiped out easily.

Having recently done some agent-based modeling work which is related to automata (even though in this case non-deterministic), I wanted to try out how few pixels I could add from the pseudo god mode to turn the tide in different situations. And, as you noted, late in a single game, established colors have some sort of implicit advantage with much higher numbers, regardless of how many new pixels you add.

I also agree with you that the interface adds to the frustration. It takes a long time to place pixels, when I imagine the interesting part for most people is the result of different placements, not the challenge of getting the pixels into place.


Is: "Cells surrounded by three or more cells belonging to the same opponent are consumed", not the reason for the non-constant # of cells?

I imagine that is the author's language for the fact cells get captured and turned. In fact, I don't see how it would possible for the # to stay constant; how would anyone color ever "win"(take over the board) if such a requirement was maintained?

I also may not be correctly following your questions logic...


There are xxxx number of cells.

The number displayed in each color block on the left is like a score, the number of cells it has.

Adding together those numbers != xxxx.


Try pausing the game before painting?


Ooh! Awesome :)

I've got some similar demos for rileyjshaw.com/terra that I haven't thrown up yet, I'll see if I get a chance to this week. One fun advantage of doing this in Terra is that it supports periodic boundaries (meaning that there aren't any "safe" edges)


The same effect could be achieved by taking a low resolution image and each turn, making each pixel the color of a random neighbor. The only thing this has to do with the Game of Life is both can be simulated by copying one array to another and applying some simple rules.


It would be a neat feature to allow us to upload an image of the right size as a seed for the game


That's a nice concept. Seeing how various seed images play out could be really interesting.


This is an awesome idea. I think I might do this next!


It's interesting dumping groups of cells into different parts of the board and seeing how it reacts - a group in the middle of one color gets absorbed quickly, a group along the border of several colors hangs on for much longer, etc.


Nice! I made something similar except it was more about how people are influenced by ideas of people around them and less about violence. link: http://goo.gl/H0Wqxo


Without pausing, just by rapidly adding pink cells at the borders between two colours, it is possible to make one of them go extinct.

http://i.imgur.com/q2OIJNh.png


Practise starting revolutions: colour the whole board white, and see which minimal combinations of black will eventually take over the board.


A bit like A. K. Dewdney’s idea of the “voters” simluation (as seen implemented in the old xlockmore program mode “voters”).


Interesting - red got blue and green into a corner, had time to gobble them up for itself, and then went on to defeat black!


Surprisingly interesting to play and watch. I would like more tools to add cells(mspaint-like)


Indeed; I found that trying to help a side by adding to its numbers near to its borders typically resulted in that side dying off faster... unexpected.


Every time I add (pink) cells, they are always immediately killed. Is that intended?


Pause it and add a blob. My pink blob made blue go extinct ):


Try pausing it, then adding a larger clump.


Needs population count as a live graph.


And an API.


5 minutes:

The hordes of Lime Green grow stronger every second. We face a growing threat from the Blacks and the Blues to the east. I shall fight for a few more minutes.

10 minutes:

We face complete annihilation from the unstoppable growth from Blacks. Lime Green horde is nearly decimated, it was only a few minutes ago they seemed unstoppable.

15 minutes:

Lime Green have been completely annihilated! We are caught between the epic battle between Blacks and Blues. I rest for a few minutes.

20 minutes:

We are caught in a stalemate with the Blacks. The eastern front bears the crushing weight of Blues onslaught of attacks and raids. The night is getting cold, we are tired.




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

Search: