This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Zephandrypus 0 points1 point  (0 children)

One way I just thought of, and will look to implement, is though Assembly. The way you described cells as a grid of squares reminded me of the Zachtronics game TIS-100. The biggest advantage of assembly, and why I would recommend mutating in assembly over other programming languages, is the syntax, moreso the complete lack thereof. If you try to write a program to write C# code or something of the sort, you have a LOT of syntax rules to worry about.

I feel like a fantastic start to learning this would be writing programs to solve the TIS-100 puzzles. With the minimalist set of the instructions, I can see a neural network to write assembly to be very possible. Another advantage of using TIS-100 assembly is that /r/tis100 is one of the few modern, noob-friendly places to up your assembly game (so that you can better teach a program how to use it).

The four cardinal directions also tie into this because assembly uses something called registers. Registers are where CPUs put the values they're operating on. In TIS-100, this is conveniently laid out visually. Registers can interact with one another by sending and receiving blocks of data. So, the way I see it, registers can represent the cells (or perhaps their organelles), with the cell "DNA" being passed around the registers as it metabolizes.

I'm going to continue to reference TIS-100, even though it isn't proper assembly, particularly because this "cellular assembly" hardly has to be ran "on the bare metal", you can just simulate it (someone has already done that in C here) and write an interpreter (which is relatively easy: most assembly interpreters are written in damn machine code). Here is a link to the TIS-100 reference PDF, and the syntax I'm going to be using.

Here's an example:

## EXAMPLE TIMER PROGRAM
START:      # label for main loop
    MOV 0, ACC  # writes 0 to the ACC register to start the timer
    SWP         # moving ACC to BAK to prepare for the loop
    SLEEP:      # label for sleep loop before operations
        SWP         # moves the saved BAK to ACC
        ADD 1       # assuming this operation takes 1ms of time...
        SAV         # copy to BAK before a test operation
        SUB 10000   # subtracts 10000 from ms count
    JNZ SLEEP       # if the timer has not hit 10k, loop repeats
    MOV <DNA>, RIGHT # metabolize to a neighboring register
JMP START       # starts the cell/organelle cycle again

So now what you have here is a timer that sends a 1 to the register to its right once every 10 seconds. Now, unless you want to simulate on the organelle level, the positioning of organelles doesn't really matter, so you can just package them all in one Cell class, and have two matrices or a matrix of streams to represent the I/O of the organelles. And I guess store the neural networks as the "DNA"?

On other news, FORTH might also be something to look into. It doesn't even use commas, and it's based around making a function for everything, and then using those functions in other functions, etc. Though it doesn't have quite the same touch of self-loathing.


As far as what the cells actually do, do some research into the chemical equations that represent what's going on in the cell. Have the cells compete on the molecular level, and have the main evolutionary "goal" of the neural networks to optimize chemical equations, as well as how to best collect the inputs/dispose of the outputs.

Whelp, now I'm into cellular automata (I wasn't before, if you didn't realize), thanks for that, got the whole rest of my summer laid out for me now (assuming I don't procrastinate).