Write a rule set of Conway's Game of Thug Life. Experiment with different successor functions until one with a reasonable behavior in accordance to the model is found, and also produces enough chaotic behavior to be interesting to watch. The program must display it's output in smiley faces. Recommended platforms are curses or javascript.
Deadline: before conway's game of dicks has its way with me.
Name:
Anonymous2013-09-03 5:15
Define each cell as containing two values, α and β. This is the seed. Start the global t=0. This could also be part of the seed. Haven't thought too much about it yet.
Evaluation of each cell is as follows: Compute Ai,j = sin (βi,j + αi,jt), and Ni,j = Avg{Ak,l | k,l neighbors of i,j }. Let ξi,j = Floor( 1 / |Ai,j - Ni,j|).
The modifcation rule: If ξi,j even, then adjust βi,j so that Ai,j = Ni,j, otherwise adjust αi,j. In each case, favor adjustments that result in a minimal absolute change in the relevant parameter. Afterwards, clamp all β to within
Output is simple. Simply partition [-1, 1] into some number of divisions and assign outputs. I'm favoring 5 right now, so that happy faces can be at the positive, sad faces can be at the negative, and 'X' can be in the middle, which means I don't have to split 0.
This is tentative right now, partially because I don't like the method of calculating ξ and partially because I'm incredibly drunk. Maybe it will be useful for crypto, huh? I don't think it's reversible, at least! I'll write up an implementation and hopefully it doesn't all shoot straight to zero.
Name:
Anonymous2013-09-03 5:28
and hopefully it doesn't all shoot straight to zero.
I know, I know. That's why I went with sin for part of the generator - hopefully unless α, β become pathologic I'll always be stuck with functions that have the possibility of becoming usable again with the next t increment. Is it bad form to use the generation number as part of the seed? Who cares.
>>7 All right, I slammed it out, mostly. I think I went a bit overboard - I must be getting infected by the middle managers talking about ``Business Logic transport layers'' and ESBs and shit.
http://repo.or.cz/w/simple-cellular-automata-suite.git . If or.cz isn't behaving for people I'll see if I can do that fancy base64-attachment thing that Admin-sama mentioned. For those of you with fancy terminals, I put a bit more trust in ncurses than I usually do, and I'm not sure if the UI hints came through correctly. [s]tep, [p]ause, [r]un, set [v]alue, and [q]uit are the keys.
The actual game-of-sinners* program implementing the α, β, ξ logic is almost certainly broken right now - it doesn't behave symmetrically, which it definitely should, and I think the `plateau' effect that it's showing right now is a result of a miscalculation on my part that forces everything to zero far too quickly. Perhaps I should rethink my ξ handling.
But anyway, the suite was pretty much designed to implement Conway's Game of Thug Life - I even bent over backwards to allow unicode grid representations. If anyone wants commit access to the repo I'll be happy to give it.
>>8 Oh yeah, duh. The way to run the damn thing. Doing the standard make will net you a binary for each ``engine-*.c'' file in the source directory. These are individual simulation programs that run with exactly the ruleset defined in the engine file, with my ncurses-based interface slapped on the front.
If you run one of these programs standalone, it will initialize with a ``blank'' field of the optimal size for your terminal window. You can then set some [v]alues and set up a simulation the way you want. Since that's a pain in the neck, you can also pass an argument of exactly one filename to a binary, and it will read it in. Each engine defines its own data format, which I might get around to fixing, but there are samples for the engines that are already there and the initialize_f functions should be pretty straightforward if you like to work by copypasta.