Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4

Author Topic: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock  (Read 12040 times)

Saint

  • Bay Watcher
    • View Profile
Re: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock
« Reply #30 on: August 28, 2011, 07:45:03 pm »

Just get the runesmith utility and set attributes your self, eliminates testing.
Logged
Hazordhu 2: Dwarven recruits wanted!
You should all be ashamed of yourselves.  The obvious solution is to chain the baby up at the entrance as a kobold detector.

darkflagrance

  • Bay Watcher
  • Carry on, carry on
    • View Profile
Re: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock
« Reply #31 on: August 28, 2011, 07:55:09 pm »

Just get the runesmith utility and set attributes your self, eliminates testing.

That's like saying use Runesmith to build your pyramid out of obsidian, eliminates digging, designating, and constructing.
Logged
...as if nothing really matters...
   
The Legend of Tholtig Cryptbrain: 8000 dead elves and a cyclops

Tired of going decades without goblin sieges? Try The Fortress Defense Mod

Nil Eyeglazed

  • Bay Watcher
    • View Profile
Re: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock
« Reply #32 on: August 28, 2011, 08:06:27 pm »

Just get the runesmith utility and set attributes your self, eliminates testing.

The thing is, it doesn't work.  First you have to know what causes a certain speed; as far as I know, that's not a solved problem.  Yes, agility and strength affect it, but so does something else, something unknown.
Logged
He he he.  Yeah, it almost looks done...  alas...  those who are in your teens, hold on until your twenties...  those in your twenties, your thirties...  others, cling to life as you are able...<P>It should be pretty fun though.

Corneria

  • Bay Watcher
  • [TORTURE_FOR_FUN:ACCEPTABLE][TRESPASSING:SHUN]
    • View Profile
Re: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock
« Reply #33 on: August 28, 2011, 10:50:39 pm »

Just get the runesmith utility and set attributes your self, eliminates testing.

The thing is, it doesn't work.  First you have to know what causes a certain speed; as far as I know, that's not a solved problem.  Yes, agility and strength affect it, but so does something else, something unknown.
With an even larger sample size of goblins, we could test out various attributes and physical traits. Unless for some reason it is completely hidden, in which case we all owe a big thank you to Toady. This would work better with a more thorough sorting system using smaller speed intervals than greater and less than 10.

In fact, I think I'll look into building such a thing. Set all their attributes the same, let them sort out. Search for patterns based on height, size, etc. Using your current sorting system, I might be able to get results if the variances are great enough.
Logged
Oh yeah: Nazis.  Now I lost the argument.  So you can't argue with me anymore.  Nyah.

Nil Eyeglazed

  • Bay Watcher
    • View Profile
Re: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock
« Reply #34 on: August 29, 2011, 01:15:51 am »

Just get the runesmith utility and set attributes your self, eliminates testing.

The thing is, it doesn't work.  First you have to know what causes a certain speed; as far as I know, that's not a solved problem.  Yes, agility and strength affect it, but so does something else, something unknown.
With an even larger sample size of goblins, we could test out various attributes and physical traits. Unless for some reason it is completely hidden, in which case we all owe a big thank you to Toady. This would work better with a more thorough sorting system using smaller speed intervals than greater and less than 10.

In fact, I think I'll look into building such a thing. Set all their attributes the same, let them sort out. Search for patterns based on height, size, etc. Using your current sorting system, I might be able to get results if the variances are great enough.

That would be pretty cool.  During the construction of my QA, I kept thinking about the possibility of more advanced sorting.  It's a much more difficult task than the kind of sorting I did-- 10/step is kind of a magical number, easiest to test for.

I've looked into the problem of speed before here ( http://www.bay12forums.com/smf/index.php?topic=91016.0 ) if that's any use to you.  Because it's a topic of interest to me, I've been looking for patterns in my goblin races, but I haven't noticed anything.
Logged
He he he.  Yeah, it almost looks done...  alas...  those who are in your teens, hold on until your twenties...  those in your twenties, your thirties...  others, cling to life as you are able...<P>It should be pretty fun though.

Nil Eyeglazed

  • Bay Watcher
    • View Profile
Re: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock
« Reply #35 on: August 29, 2011, 04:45:20 pm »

Then again, I might just build one.

Here is my plan for 16 bits of memory.  I plan to have 8 of these, to run 4 bit instructions taking a 4 bit address argument and to have 8-bit data bytes.  Of course, you can always use more than 1 byte to store a value.



First thing you might notice is that 16 bits are a lot more streamlined than our single bit with addressing goblin.  We can use a single goblin to read from or write to the specified bit.  That unfortunately means he's going to be moving slower though.

Second thing you might notice is that everything is a little streamlined.  We still have 4 paths per bit, but we're reusing some of those paths.  Since our addressing goblin is guaranteed an addressable bit, we don't have to give him a backup path.  Our memory doesn't have the side doors either.  That's because I realized we don't need them.  We just send a trip to one of the hatches between memory states.  (By trip, I mean an open-close signal, like we get when pathing over a pressure plate.)  That's a little slower, and I might build doors in later.  I've got the room.

Next thing you might notice are two special memory bits.  They're versions of my memory 2.0.  That's because these are going to have special functionality.  Together, they will form a 16-bit clock that I can read from.  That's nice functionality for any programs we might write.  The first clock bit toggles from a clock signal, and each succeeding bit increments every time the last bit goes from 0 to 1.

But I can also write to them.  That's important for a couple of reasons.  One is that if my clock rolls over to 0 before I check for time>clock+100 (for instance) then my programs won't work.  So I want to be able to zero my clock.  The other reason is that 16 bytes aren't a lot of memory space, and I want to be able to use these clock bytes for regular computer purposes if I don't need my clock.

Wouldn't positions 0 and 1 make more sense for my clock bytes?  Or 14 and 15?  Yeah, but reading from clock is very timing dependent.  I want these bytes close to my addressing goblin.  In fact, my increment clock signal needs to open a hatch for each clock byte to prevent reading or writing during state transitions.  (I can already write without triggering the increment feature.)

There's one more thing I'm going to need, because if I want to use my clock bytes for regular data, I need to output to clock, to send Dostngosp along an alternate clock loop (so he keeps time) that doesn't increment my clock bytes.  I could make a special output instruction, since I now have room for 16 opcodes and only use 6, but instead I'm going to designate an output byte.  That means that the state of my clock (increment clock bytes, or don't increment) is going to be determined by one of my memory bits.

But I'll eventually want to output to other things as well, and I don't want to waste a byte on each output.  So we're going to need a way to write bits to memory instead of bytes.  Right now, we don't have that.  We'll need a new instruction for our cpu.

There's one other thing.  Our computer is going to run really, really slow.  It won't be able to keep up with the numbers on our clock.  So we're going to change our comparison instruction from a "jump if reg1=reg2" to a "jump if reg1>=reg2."  That'll work for clock programs, and it'll still work for FOR loops.  Mostly, we can use our exact same comparison design-- we already have an arm that fires if reg1 is 0 and reg2 is 1, and vice versa.  We're only going to have change how we handle the integration of 8 of those signals.

EDIT: Actually, I can read and write bits.  To toggle bit 0, for instance, I increment it once.  To read bit 7, I see if it's >=128.  Reading bit 0 takes a lot of operations and/or constants, and writing to bit 7 takes a lot of incrementation.  I don't think I'll have the memory to read bit 0 (but there's probably a trick to trade speed for memory.)  Someday I'll need bit-specific operations, probably a position shift, but for right now I won't worry about it.

Also, my output byte should also be an input byte, to report on the status of every device outputted to.  That way I can still have a lever controlling my drawbridge and maintain programmed drawbridge functionality.  So the output byte will need to be synced like the clock (outside input blocks read/write access via a hatch triggered with every write) to prevent simultaneous read and write operations.  This goes both ways (for the clock too).  Since I can't slow Dostngosp, I'm going to block access in anticipation of his write, as well as following his write.  Maybe I'll only allow a brief window to write.  I'll need adressor ground after all, for when no path is accessible due to outside writes.
« Last Edit: August 29, 2011, 05:58:10 pm by Nil Eyeglazed »
Logged
He he he.  Yeah, it almost looks done...  alas...  those who are in your teens, hold on until your twenties...  those in your twenties, your thirties...  others, cling to life as you are able...<P>It should be pretty fun though.

Nil Eyeglazed

  • Bay Watcher
    • View Profile
Re: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock
« Reply #36 on: August 31, 2011, 01:37:40 am »

I'm pretty sure I'm not going to continue with this, because DF has sucked up way too much of my time already, but I'm going to show you what that plan turned into, in the off chance that it's useful to anyone:



Okay, let me explain a few things.

Addressing goblin sits by the central staircase.  When it's time to read or write, we send a trip to the hatch cover; 100 ticks later he runs to read or write one of our bits.

If you count the doors, you'll see that the goblin has to pass through 6 doors to reach any pressure plate.  One of those doors is memory status (1 or 0), one is read or write, and four correspond to the 4-bit address.  We need 6 doors for every path, but not 6 doors for every plate-- many of those doors see use in multiple paths.

We've got a problem in that with such a long path, the goblin is going to have multiple paths-- reset position will become a viable path before he reaches read/write plates.  That's why we have the door by reset-- it gets opened when we want a loop.

Which still leaves us with a return position.  I've built a ground, because we want fast return (in fact, with my design, I still need a super fast goblin.  Should have left myself more room.)  All read/write plates are linked to a door blocking the south central staircase exit.  Addressing goblin will run for this exit, but won't make it in time.

You can see a weird piece of memory in the very south.  This is our read/write memory-- it specifies whether we reading or writing, and is linked to those doors.  We're also using it to do some pathing tricks.  Successful read or write triggers a loop that we can use to run trips (on signals followed by off signals).  Main memory is linked to the doors, so first step on triggering is to close all read or write doors so that our addressing goblin maintains a single path.  After that, I can't really remember :)  End pressure plate is linked to return to reset door, giving our addressing goblin a path home.  To begin the cycle, we run a trip on the read/write goblin's return to main position as well as on the addressing goblin's hatch.  Addressing goblin reaches read/write pressure plate permitting pathing; shortly afterwards, addressing goblin's return to reset is blocked.  Well, something like that.  Like I said, I can't remember :)

Southeast staircase is just dig/building access.  Wall it up later.

This is just 16 bits; I haven't even tested them yet.  We need 8 times this.  We also need two 8-bit registers, operations on each register (probably 8 goblins per special kind of operation, like >= or leftshift, but we could reuse the circuits at the expense of speed), 1 8-bit buffer, 2 4-bit addresses, 1 4-bit instruction, addressing for all of the above, and probably a handful of manager-type circuits-- at the very least, a goblin to keep track of where we're at in the cycle (read from memory, copy to instruction+address, increment address, execute instruction).  It would take a stronger man than me to finish it.
Logged
He he he.  Yeah, it almost looks done...  alas...  those who are in your teens, hold on until your twenties...  those in your twenties, your thirties...  others, cling to life as you are able...<P>It should be pretty fun though.

moki

  • Bay Watcher
    • View Profile
Re: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock
« Reply #37 on: August 31, 2011, 06:28:58 am »

Sad to hear about the indefinite hiatus... but I'll hazard a prophesy: you'll come back some day... ;)

I don't even come close to understanding this thing. I know what it does, but when I think about how it does it, my brain goes all melty. It's a lot like Hex from the disc world, only dwarfier :)

Logged
But my good sir, the second death was for Dwarven Science!

monk12

  • Bay Watcher
  • Sorry, I AM a coyote
    • View Profile
Re: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock
« Reply #38 on: August 31, 2011, 12:27:30 pm »

Fantastic. I doff my hat to you, good sir dwarf.

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock
« Reply #39 on: September 02, 2011, 07:47:44 am »

Just one question: What's the difference in building a door before or after a pressure plate?
Logged

Di

  • Bay Watcher
    • View Profile
Re: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock
« Reply #40 on: September 02, 2011, 09:09:54 am »

1 frame delay, I think. This page surely needs to be visited more often
Another question, what's problem with skill rust? Only armor user should affect the speed so why not just unequip  goblins before use?
Logged
Quote from: Creamcorn
Dwarf Fortress: Where you meet the limit of your imagination, moral compass, sanity and CPU processor.
http://www.bay12forums.com/smf/index.php?topic=103080.0 Fix sober vampires!
http://www.bay12forums.com/smf/index.php?topic=91442.0 Dwarven Cognitive Science

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock
« Reply #41 on: September 02, 2011, 02:53:25 pm »

Agility can also rust.
Next question: Does the building order depend on the designation time or the time the building is completed?
Logged

JimiD

  • Bay Watcher
    • View Profile
Re: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock
« Reply #42 on: September 07, 2011, 04:47:09 pm »

A computer, based on the movement of goblins? This should be shouted from the rooftops, or at least put in the wiki.

All credit to the OP for designing the concept, and when someone, and it is when and not if, builds a working computer, they will be legendary too.

Seriously, this seems to have just dropped of the radar.  What could be better than a computer tended by dwarves, with goblins as the OS?*. And this is one case where Magma is not the answer.



*and how exactly do you describe this?  The water powered computer was obvious, but the goblins are not powering it, just doing the operations?
Logged

Nil Eyeglazed

  • Bay Watcher
    • View Profile
Re: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock
« Reply #43 on: September 07, 2011, 05:33:03 pm »

Lol, I'm glad you like it.  Right now, there's no computer, just a description of the kind of logic devices you'd need to build a working computer.  I've tried, but I just can't stop designing-- in fact, moving to pure theory has let me move at breakneck pace.  I've pretty much written a book on goblin-based creature logic now and it's on my wikipage.

http://df.magmawiki.com/index.php/User:Vasiln/Goblin_Logic_1 is an introduction to design philosophy, with a heavy focus on the infrastructure you need to build goblin logic devices-- the kinds of problems you run into, some basic designs for controlling movement that you'll use over and over again, demonstrated by working examples of things you might want to do.

http://df.magmawiki.com/index.php/User:Vasiln/Goblin_Logic_2 starts out with memory addressing, goes on to build an optimized adder with look ahead that can add 2 8-bit numbers and generate a carry in 600 ticks, and ends with example programs.

http://df.magmawiki.com/index.php/User:Vasiln/Goblin_Logic_3 optimizes memory+addressing, and explains input/output-- including clock and multiplexer examples.  (I'm going to try to fit a binary->decimal output in this section when I can, and maybe even a decimal->binary input.)

Overall, I'm designing a 32 byte, 8 bit programmable, Turing complete computer, with optimized adds, bit-shift, and compare functions, multiplexed memory (so 32+ bytes, really-- with enough map space I could almost match an ATARI 800, lol), with two registers and a couple of specialized bytes of memory (a couple bytes optimized for writing, most of it optimized for reading; a multiplexed output byte; a clock input byte).  Anything else I can think to design along the way, I will.

Next question: Does the building order depend on the designation time or the time the building is completed?

If I knew for sure, I would've answered immediately :)  I suspect that it depends on the designation time rather than completion time.

Lever page might not be best source for build order information.  I've posted my findings re: build order at http://df.magmawiki.com/index.php/Pressure_plate

Didn't bother changing the lever page, because my build order experiments were entirely with pressure plates, and who knows, maybe levers work differently.
« Last Edit: September 07, 2011, 06:05:14 pm by Nil Eyeglazed »
Logged
He he he.  Yeah, it almost looks done...  alas...  those who are in your teens, hold on until your twenties...  those in your twenties, your thirties...  others, cling to life as you are able...<P>It should be pretty fun though.

Gentlefish

  • Bay Watcher
  • [PREFSTRING: balloon-like qualities]
    • View Profile
Re: A still mountain, a dry dwarf, and about 400 goblins: The Invader Clock
« Reply #44 on: October 04, 2012, 03:14:56 am »

Dude. If you can match an Atari. Build pong. It will be the most mega of megaprojects. Meta-gaming will have new meaning.
Pages: 1 2 [3] 4