I'd try this but I don't think I can even grasp it, let alone comprehend it.
I'm happy to explain anything. The fun in this for me is totally in figuring it out, and I think just a little bit of understanding can get the creative juices really flowing. Basically, anything is possible.
One thing I don't mention very much is the basic layout of controlling goblin movement. It's totally based on Fenwah's goblin grinder designs described at
http://www.bay12forums.com/smf/index.php?topic=62798.0and I totally owe Fenwah a shout-out. I think a lot of people missed the fact that Fenwah's real innovation wasn't the goblin grinder trap, but the high speed switches he (she?) designed. I straight up ripped off one of those switch designs are my basic memory cell. (I didn't even realize that until I just looked at the thread again).
1. While this DOES make it less dwarfy, it is easier to get 400+ cats or tame birds than goblins. To make up for it, drop failing cats/birds to give the clock a nice red coat.
Isn't there a breeding limit? And it's hard to kill off cats to get a new test set. In the meantime, the goblins send me about fifty invaders once or twice a year.
And they don't die of old age, don't have babies, don't eat or drink, don't sleep, don't go berserk or melancholy. Flightless birds might be okay, but they still die of old age.
Mostly, I'm just not too familiar with domestic pathing, and by now I'm really confident about invader pathing. Like, aren't cats trapimmune? And what if they start pathing to some vermin in the same cell as the cat? Plus, building these pressure plates with citizens trigger would mean build hell-- think of all those stuck dwarves.
2. Speed is measured in hundredths of a step between moves. To my knowledge, a creature cannot have a fractional speed.
You notice that I talk about delay, not speed. That's because delay is something that I can observe, whereas speed is not-- although you can express either as a function of the other. When I say that a creature has a 9.99 delay, one way to think about that is that it's a creature with 899 speed. That means a 99% chance of moving at delay 10 with any given move, and a 1% chance of moving at delay 9. The probabilistic nature of movement is one reason that I have to run creatures through the loop so many times, and even then, I can't have full, 100% confidence that they're actually delay 10.
Delay should be (speed+100)/100. But attributes modify speed, and don't do so in integer based increments-- a creature with 900 speed and high agility, for instance, might function as if it had a speed of 850, so what would high agility do to a creature with base speed 100? Same modifier would lead to fractional modified speed unless Toady rounds it, and he doesn't have to round it to the nearest whole number. There are other modifiers too, ones that I don't understand. But the overall picture is that I'm not going to work under the assumption that delay*100 is an integer. Well, at least, I don't have full confidence in that assumption, even if I do believe it. (Notice that I have been working under the assumption that some multiplier of delay is an integer. Otherwise, there is no way that I can ever have any level of confidence in my delay 10 goblin.) (Heavily edited this section because I got it wrong the first time-- so if you're saying, "Wait, you were wrong and you changed it!" you're correct.)
On preview:
Having watched the video, I have a question:
Why is it that you can forbid the doors even after goblin prisoners pass through them without the doors becoming claimed by the enemy and thus uncontrollable? Is it because the goblins are trying to escape rather than attack?
Wow. That's a good question. I've never even stopped to think about that. I guess it must be because they're all captured and in flee mode. (Just in case it's not clear, those are just manual switches that allow me to set memory values before my whole computer is finished. They can be easily automated, as demonstrated by the memory and register cells.)
Okay, excuse my tangents, and permit me a new one.
I've just been making components so far, but it's time for the big picture. I've got to figure out exactly how my processor is going to function. There's got to be a flowchart:
1) Read 6-bit value from memory address pointed at by 3-bit next_instruction_address register into buffer (I was calling this a register before, but now I'm going to call it a buffer)
2) Increment next_instruction_address register
3) Copy first 3 bits of buffer to 3-bit next_instruction register
4) Copy last 3 bits of buffer to 3-bit instruction_target_address register
5) Evaluate next_instruction:
a. 000: Jump: Set next_instruction_address equal to instruction_target_address
b. 001: Read to register 1. Write 6-bit value pointed at by instruction_target_address into buffer. Copy buffer into 6-bit register_1.
c. 010: Read to register 2. Write 6-bit value pointed at by instruction_target_address into buffer. Copy buffer into 6-bit register_2.
d. 011: Write from register 1. Copy 6 bit register_1 value into the memory cell pointed at by instruction_target__address
e. 100: Increment register 1. Add 1 to the 6-bit register_1 value.
f. 101: Compare registers. If register_1 is equal to register_2 then set next_instruction_address equal to instruction_target_address; otherwise, don't do anything
6) Repeat.
So to make this I'm going to need:
a 6-bit buffer (writes to and reads from any memory; writes to and reads from register 1; writes to register 2, instruction register, and instruction_target register)
a 6-bit register (write to or read from buffer; increments; compares to register 2)
another 6-bit register (read from buffer; compares to register 1)
a 3-bit next_instruction_address register (increments; reads from instruction_target register; addresses memory)
a 3-bit instruction_target register (reads from buffer; writes to next_instruction_address; addresses memory)
a 3 bit current instruction register (evaluate to determine instruction)
We know how to build increments. We know how to build memory. We know how to read and write. We know how to address memory. In fact, the only thing we need that we haven't already built is a compare function. (We'd be better off using an add rather than an increment for instruction 100-- we can always store a 000001 someplace in memory. Hell, we could design an add that outputs to register 2, store a 000000 in memory, and then we could free up instruction 010 also, although if we did so we'd probably want a write from register 2 instruction. But increment's good enough for now. After all, with a loop, we can add anything anyways.)
And with that, I'll have a programmable computer. Of course, the only thing it'll really be able to do is run a FOR loop. I've got space for two more instructions. Any suggestions?