Author Topic: Hyperspeed Mode  (Read 22422 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hyperspeed Mode
« Reply #15 on: January 24, 2010, 08:09:21 PM »
Quote from: Houshalter
I heard/read somewhere that it was possible to convert a program (like DB) into a hardwired computer chip or something. I know theres sites out that let you order computer chips, they'll make it, you just have to design it. So can you get db hardwired. That would  increase speed wouldn't it. My knowledge on electronics is kind of small though, but if you hardwired it you could set the stuff like max bot population to something really high and it should run just as fast. You could have all the bots' dna execute simultaniously. Im guessing the cost to do something like that would be kind of high. And if you discovered a bug youd have to live with it.  

Any software can be converted in to hardware.  It's just really expensive.  And you always have to ask: if I spent this same amount of money on general purpose CPUs or programmable GPUs, would I get more for my money?

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
Hyperspeed Mode
« Reply #16 on: January 25, 2010, 11:35:18 PM »
Quote from: Numsgil
Quote from: jknilinux
Is it possible to use a cellular automata as a basis for DB physics? See here and here .

Digital physics seems to bear a close resemblance to cellular automata, and as such should be easy to use the hashlife algorithm on...

I have always wanted to find a way to combine DB with cellular automata...

Yes, it's possible to simulate DB on a CA grid, and yes, it would probably make the physics (which is a significant CPU load) much faster.  But I think Darwinbots' physically simulated environment is one of its strengths.  CA don't quite inspire the imagination since they don't actually resemble anything real.  With Darwinbots it's like you're looking through a microscope or at a fish tank.

How would that work? You obviously can't create the DBs themselves out of the CA grid, can you?

Also, how much easier/harder would it be to use CA physics instead of the one you're working on?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hyperspeed Mode
« Reply #17 on: January 26, 2010, 01:30:53 AM »
Quote from: jknilinux
Quote from: Numsgil
Quote from: jknilinux
Is it possible to use a cellular automata as a basis for DB physics? See here and here .

Digital physics seems to bear a close resemblance to cellular automata, and as such should be easy to use the hashlife algorithm on...

I have always wanted to find a way to combine DB with cellular automata...

Yes, it's possible to simulate DB on a CA grid, and yes, it would probably make the physics (which is a significant CPU load) much faster.  But I think Darwinbots' physically simulated environment is one of its strengths.  CA don't quite inspire the imagination since they don't actually resemble anything real.  With Darwinbots it's like you're looking through a microscope or at a fish tank.

How would that work? You obviously can't create the DBs themselves out of the CA grid, can you?

Also, how much easier/harder would it be to use CA physics instead of the one you're working on?

Bots would occupy either a single cell or maybe a fat cross or something like that.  Shots would be single cells.  Not sure how ties would work.  Maybe they just stick two bots' cells together.  The physics would then just be updating cells based on "velocity" of each cell.  Sort of like the falling sand game.  The physics could be hyper accelerated on graphics cards so we could have hundreds of thousands of cells simulated in real time (not counting DNA execution speed, game logic, etc.  But physics is a significant chunk of sim speed so it would be faster).

But what it gains in speed I think it loses in complexity.  You can't really simulate things like accelerating (eg: falling), or spinning about your center of mass (for tied bots), and your range of velocity values is strictly limited to either moving to an adjacent cell or not.

Assuming DB3 were all set up, you could probably jury rig a version that used CA physics.  The hard part would be figuring out what physical values to feed in to DNA and the game logic.

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Hyperspeed Mode
« Reply #18 on: January 26, 2010, 10:09:02 AM »
The falling sand game is awesome. I always wanted to see a alife sim int the style of the Powder Game. DB comes close with its physics, but theres no air pressure, and there arnen't any materials to interact with.

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
Hyperspeed Mode
« Reply #19 on: January 26, 2010, 09:05:17 PM »
Quote from: Numsgil
Bots would occupy either a single cell or maybe a fat cross or something like that.  Shots would be single cells.  Not sure how ties would work.  Maybe they just stick two bots' cells together.  The physics would then just be updating cells based on "velocity" of each cell.  Sort of like the falling sand game.  The physics could be hyper accelerated on graphics cards so we could have hundreds of thousands of cells simulated in real time (not counting DNA execution speed, game logic, etc.  But physics is a significant chunk of sim speed so it would be faster).

But what it gains in speed I think it loses in complexity.  You can't really simulate things like accelerating (eg: falling), or spinning about your center of mass (for tied bots), and your range of velocity values is strictly limited to either moving to an adjacent cell or not.

Assuming DB3 were all set up, you could probably jury rig a version that used CA physics.  The hard part would be figuring out what physical values to feed in to DNA and the game logic.

That isn't a cellular automata... I quote wikipedia:

" A new generation is created (advancing t by 1), according to some fixed rule (generally, a mathematical function) that determines the new state of each cell in terms of the current state of the cell and the states of the cells in its neighborhood."

Just because the universe is broken up into boxes doesn't make it a cellular automaton. The state of each cell depends solely on the states of the surrounding cells. See conway's game of life.

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Hyperspeed Mode
« Reply #20 on: January 26, 2010, 11:08:19 PM »
Ya but the state of each cell can be an infinitely large number of possibilitys. The entire bots memory, input, output, dna, velocity, etc. etc.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hyperspeed Mode
« Reply #21 on: January 26, 2010, 11:56:04 PM »
Quote from: jknilinux
Quote from: Numsgil
Bots would occupy either a single cell or maybe a fat cross or something like that.  Shots would be single cells.  Not sure how ties would work.  Maybe they just stick two bots' cells together.  The physics would then just be updating cells based on "velocity" of each cell.  Sort of like the falling sand game.  The physics could be hyper accelerated on graphics cards so we could have hundreds of thousands of cells simulated in real time (not counting DNA execution speed, game logic, etc.  But physics is a significant chunk of sim speed so it would be faster).

But what it gains in speed I think it loses in complexity.  You can't really simulate things like accelerating (eg: falling), or spinning about your center of mass (for tied bots), and your range of velocity values is strictly limited to either moving to an adjacent cell or not.

Assuming DB3 were all set up, you could probably jury rig a version that used CA physics.  The hard part would be figuring out what physical values to feed in to DNA and the game logic.

That isn't a cellular automata... I quote wikipedia:

" A new generation is created (advancing t by 1), according to some fixed rule (generally, a mathematical function) that determines the new state of each cell in terms of the current state of the cell and the states of the cells in its neighborhood."

Just because the universe is broken up into boxes doesn't make it a cellular automaton. The state of each cell depends solely on the states of the surrounding cells. See conway's game of life.

Right, a CA means you can do an update cycle using only local information about cells around the currently updating cell.  What I described fits that model perfectly, so I think there's a miscommunication here.  What in the system I described makes it not a CA?

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Hyperspeed Mode
« Reply #22 on: January 27, 2010, 03:38:06 PM »
I reread it and found a problem with this idea. Each cell is updated based on its neiboring cell. Vision would be difficult if you could only see the cells next to you, not the cells 2 or 3 spaces away. You could do some sort of cell vision system where the image 'moves'. In other words every cell next to a bot is updated with the details of the bot and carry it on the the cell next to them, so that the image of a bot can travel a long way. You could have the image 'fade' over time. One more thing, CAs are very mathmatical, not any randomness except mabey the starting seed. You wouldn't be able to do mutations and rnd functions.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hyperspeed Mode
« Reply #23 on: January 27, 2010, 04:22:21 PM »
Quote from: Houshalter
I reread it and found a problem with this idea. Each cell is updated based on its neiboring cell. Vision would be difficult if you could only see the cells next to you, not the cells 2 or 3 spaces away. You could do some sort of cell vision system where the image 'moves'. In other words every cell next to a bot is updated with the details of the bot and carry it on the the cell next to them, so that the image of a bot can travel a long way. You could have the image 'fade' over time.

CA's don't need to be at most 1 cell away or anything like that.  There's this idea of a "neighborhood".  The neighborhood can be indefinitely large, as long as it's finite.  To qualify as a CA, all that needs to be true is that:

1.  You're world is discrete (eg: grid based)
2.  Each cell is discrete (eg: finite state machine)
2.  The new state of a cell can be entirely determined from its existing state and the states of cells in its "neighborhood".

Quote
One more thing, CAs are very mathmatical, not any randomness except mabey the starting seed. You wouldn't be able to do mutations and rnd functions.

I'm not sure if randomness (eg: non-determinism) would make a CA not a CA.  I don't think determinism is a requirement.  And anyway, random numbers in computers are deterministic anyway, since they use fancy algorithms that always generate the same output given the same seed.  So as long as you were careful about giving, say, each cell it's own random number generator, it would work.

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Hyperspeed Mode
« Reply #24 on: January 27, 2010, 08:36:39 PM »
Alright, so you can do db in CA. Would it then be possible to put a hashlife or similiar algorithm to it. The number of possible states is very large, but in db many bots from the same species have the same dna, or at least very similiar dna, so they will do the same thing in the same situation. You might have to put a special condition in for the randomness factor to.
Quote
What I meant was the bots would exist outside of the CA universe but could still influence or be influenced by the universe.
How could/would that be done, because thats a cool idea. I can imagine a giant conways game of life replacing "the big blue screen", and the db universe would overlap it. Bots would be able to have a third sense to see the cells and could manipulate them some how. You could do ant bots by having bots create a walls and tunnels with oscilators and stills.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hyperspeed Mode
« Reply #25 on: January 28, 2010, 03:15:42 AM »
Quote from: Houshalter
Alright, so you can do db in CA. Would it then be possible to put a hashlife or similiar algorithm to it. The number of possible states is very large, but in db many bots from the same species have the same dna, or at least very similiar dna, so they will do the same thing in the same situation. You might have to put a special condition in for the randomness factor to.

You could probably speed up the physics quite a bit.  The DNA is already amenable to caching anyway.  It wouldn't be crazy faster like the hashlife is.  More like, maybe, 10x faster or something along those lines.  Of course, we could cache DNA right now and gain some savings (maybe make the program run 150% as fast or something along those lines.  Depends how much work the physics engine is doing).

Quote
Quote
What I meant was the bots would exist outside of the CA universe but could still influence or be influenced by the universe.
How could/would that be done, because thats a cool idea. I can imagine a giant conways game of life replacing "the big blue screen", and the db universe would overlap it. Bots would be able to have a third sense to see the cells and could manipulate them some how. You could do ant bots by having bots create a walls and tunnels with oscilators and stills.

That's always an option.  There was a plan for something like this for a while (environment grid), but it's memory intensive, and has some other issues, too.  For DB3 I'm mostly hoping to get away without any grids of any sort, and just use other techniques that are more "organic", but we'll see how it goes.

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
Hyperspeed Mode
« Reply #26 on: January 28, 2010, 01:11:58 PM »
Quote from: Numsgil
Quote from: jknilinux
Quote from: Numsgil
Bots would occupy either a single cell or maybe a fat cross or something like that.  Shots would be single cells.  Not sure how ties would work.  Maybe they just stick two bots' cells together.  The physics would then just be updating cells based on "velocity" of each cell.  Sort of like the falling sand game.  The physics could be hyper accelerated on graphics cards so we could have hundreds of thousands of cells simulated in real time (not counting DNA execution speed, game logic, etc.  But physics is a significant chunk of sim speed so it would be faster).

But what it gains in speed I think it loses in complexity.  You can't really simulate things like accelerating (eg: falling), or spinning about your center of mass (for tied bots), and your range of velocity values is strictly limited to either moving to an adjacent cell or not.

Assuming DB3 were all set up, you could probably jury rig a version that used CA physics.  The hard part would be figuring out what physical values to feed in to DNA and the game logic.

That isn't a cellular automata... I quote wikipedia:

" A new generation is created (advancing t by 1), according to some fixed rule (generally, a mathematical function) that determines the new state of each cell in terms of the current state of the cell and the states of the cells in its neighborhood."

Just because the universe is broken up into boxes doesn't make it a cellular automaton. The state of each cell depends solely on the states of the surrounding cells. See conway's game of life.

Right, a CA means you can do an update cycle using only local information about cells around the currently updating cell.  What I described fits that model perfectly, so I think there's a miscommunication here.  What in the system I described makes it not a CA?

Maybe it's that by CA, I mean an automata obeying very simple mathematical rules, such as those used in conway's game of life. Here, a bot, and even shots, are far too complex to be simulated by single cells. The simplest moving pattern in GoL is 5 cells in size, and a replicating pattern has not yet been discovered, probably because it is suspected to be thousands, if not millions of cells in size.

What you're describing sounds like Evolve 4.0, which does use discrete cells but is not a cellular automaton.


Basically, what I'm suggesting is not programming in any sort of physics, and letting the physics itself emerge out of the cellular automata. CGoL didn't have any physics programmed into it, flying and stationary objects emerged naturally.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hyperspeed Mode
« Reply #27 on: January 28, 2010, 04:28:24 PM »
Quote from: jknilinux
Quote from: Numsgil
Quote from: jknilinux
Quote from: Numsgil
Bots would occupy either a single cell or maybe a fat cross or something like that.  Shots would be single cells.  Not sure how ties would work.  Maybe they just stick two bots' cells together.  The physics would then just be updating cells based on "velocity" of each cell.  Sort of like the falling sand game.  The physics could be hyper accelerated on graphics cards so we could have hundreds of thousands of cells simulated in real time (not counting DNA execution speed, game logic, etc.  But physics is a significant chunk of sim speed so it would be faster).

But what it gains in speed I think it loses in complexity.  You can't really simulate things like accelerating (eg: falling), or spinning about your center of mass (for tied bots), and your range of velocity values is strictly limited to either moving to an adjacent cell or not.

Assuming DB3 were all set up, you could probably jury rig a version that used CA physics.  The hard part would be figuring out what physical values to feed in to DNA and the game logic.

That isn't a cellular automata... I quote wikipedia:

" A new generation is created (advancing t by 1), according to some fixed rule (generally, a mathematical function) that determines the new state of each cell in terms of the current state of the cell and the states of the cells in its neighborhood."

Just because the universe is broken up into boxes doesn't make it a cellular automaton. The state of each cell depends solely on the states of the surrounding cells. See conway's game of life.

Right, a CA means you can do an update cycle using only local information about cells around the currently updating cell.  What I described fits that model perfectly, so I think there's a miscommunication here.  What in the system I described makes it not a CA?

Maybe it's that by CA, I mean an automata obeying very simple mathematical rules, such as those used in conway's game of life. Here, a bot, and even shots, are far too complex to be simulated by single cells. The simplest moving pattern in GoL is 5 cells in size, and a replicating pattern has not yet been discovered, probably because it is suspected to be thousands, if not millions of cells in size.

I think you're talking about totalistic CAs, which are a subset of CAs in general.

Quote
What you're describing sounds like Evolve 4.0, which does use discrete cells but is not a cellular automaton.

Yes, Evolve is like that (so are other alife programs).  No, it is a cellular automata.

Quote
Basically, what I'm suggesting is not programming in any sort of physics, and letting the physics itself emerge out of the cellular automata. CGoL didn't have any physics programmed into it, flying and stationary objects emerged naturally.

The problem when you do that is that it's A) hard to determine a good rule and B ) you don't get to pick and choose behavior you want.  Many totalistic CAs are quite boring, for instance, because the rules don't result in interesting behavior.  If you choose one that does result in interesting behavior, you have to bend whatever game design you want to do around the limitations and features of that rule.  It's much better to decide on the sort of behavior you want to see and design the rules, in a broad way, to cater to that behavior.  Then you'll get other emergent behavior from the interaction of the rules that is consistent with your original feature set.
« Last Edit: January 28, 2010, 04:29:19 PM by Numsgil »

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Hyperspeed Mode
« Reply #28 on: January 28, 2010, 05:22:47 PM »
Right. If you want to make a CA that fosters movement and self replication, you have to design the rules around it. Most random rules are 'dead ends', and don't do anything interesting at all.

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
Hyperspeed Mode
« Reply #29 on: January 30, 2010, 10:33:03 PM »
Quote from: Numsgil
I think you're talking about totalistic CAs, which are a subset of CAs in general.

Quote
Basically, what I'm suggesting is not programming in any sort of physics, and letting the physics itself emerge out of the cellular automata. CGoL didn't have any physics programmed into it, flying and stationary objects emerged naturally.

Sorry about that, I was referring to a totalistic CA...

Quote from: Numsgil
The problem when you do that is that it's A) hard to determine a good rule and B ) you don't get to pick and choose behavior you want.  Many totalistic CAs are quite boring, for instance, because the rules don't result in interesting behavior.  If you choose one that does result in interesting behavior, you have to bend whatever game design you want to do around the limitations and features of that rule.  It's much better to decide on the sort of behavior you want to see and design the rules, in a broad way, to cater to that behavior.  Then you'll get other emergent behavior from the interaction of the rules that is consistent with your original feature set.

There are also ALOT of well-known interesting CAs, CGoL is the most well-known example. There are probably thousands of less well-known rules that also result in interesting behavior, you might need more than 2 states though. (By interesting behaviour, I'm referring to wolfram class-4 automata)

Finally, there are other CAs besides totalistic ones that the hashlife algorithm can be used on... for example, an automata where its state depends on the state of the cells around it at t-2. Or an automata where a cell's state depends on the state of the cells around it, but that are not in contact with it...

Basically, I'm saying that you can "design the rules" of the totalistic/other CA, because there are limitless options.
The main problem I'm thinking of is how to interface a bot with the CA world...