Cell controls 16,000 chickens

almighty

Banned
Imagine the biggest flock of virtual fowl ever assembled. Each chicken is controlled by a simple artificial intelligence program, operating according to a handful of rules. Each chicken wants to move toward the rooster but must avoid collisions with other chickens, fences, and the barn. To do so, each one must constantly check the position of its nearest neighbors and other objects in its environment and then decide how to move.


If that doesn’t sound all that impressive to you, consider this: all 16 000 of those faux chickens are doing this maneuvering at the same time on a single Cell microprocessor. It is a chore that would tax a rack full of conventional servers.

Quite impressive, full article Here

wcuref1.jpg
 
Quite impressive, full article Here

wcuref1.jpg

I dont see 16000 chickens there but it still good (perhaps behind the view?). But a game like Rome: Total War (released in year 2004) for PC renders and manages 20000 soldiers all on screen at the same time. So frankly I don't see what the "magic" is when they say that a rack of servers would fail to do the same (unless they mean racks of PII comps)...

Massive amounts of soldiers on screen.
http://media.pc.ign.com/media/498/498739/img_2311499.html
 
I dont see 16000 chickens there but it still good (perhaps behind the view?). But a game like Rome: Total War (released in year 2004) for PC renders and manages 20000 soldiers all on screen at the same time. So frankly I don't see what the "magic" is when they say that a rack of servers would fail to do the same (unless they mean racks of PII comps)...

Because there is no crowd AI in R:TW at all. The crowds are as stupid as those in Kameo or other recent games with "fish-swarm"-like moving crowds (which looks totally ugly imo)...
 
Yes it is 16,000 chickens in the picture. 128 chickens wide by 128 chickens deep, or about 5 per linear fence section, does indeed make ~16k chickens.

The voice over states that the rapidmind toolkit allows use of this and other algorithms on cell processors, or multi-core cpus, without caring so much the underlying architecture.

At least link to the quicktimes..
http://www.rapidmind.net/samples.php

It is a cute demo. I think people who design road networks and interchanges should use software like this to model how traffic jams form and disperse, how accidents slow down traffic, and stuff like that. It would be quite something to watch such a simulation then put in a "drunk driver" or whatever.
 
It will be interesting to see if and how Ninja Theory might implement that possibility in Heavenly Sword.

One part I d like to see in that game is the open area with the soldiers. They showed a technical demo with hundreds of soldiers in GDC if I remember well but that was mainly for rugdoll physics. It will be interesting to see how crowded battlefields will be put into use with the help of the Cell.

I also wonder if this is possible with other CPU's.
 
It will be interesting to see if and how Ninja Theory might implement that possibility in Heavenly Sword.

One part I d like to see in that game is the open area with the soldiers. They showed a technical demo with hundreds of soldiers in GDC if I remember well but that was mainly for rugdoll physics. It will be interesting to see how crowded battlefields will be put into use with the help of the Cell.

I also wonder if this is possible with other CPU's.

The army AI in HS is entirely SPU based, its hierarchical with 'battalion' logic (groups of say 200 soldiers) each battalion is running a custom VM programmed in a crude visual programming langauge in our editor. Then a spatial hierarchy breaks up the battlefield into chunks with a number of soldiers in, each chunk is farmed off to an SPU where each soldier runs collision, avoidance and personal AI.
Then afterwards another SPU program, does some work to help sort and farm out work to the renderer... Some of this is done on the PPU more because some of our internal API are PPU based on moving that little bit over to SPU was too much work at the mo.


The effect is that there is high level designer control, but each solider seems fairly intelligent, avoiding things, attacking the player etc.
Its not based on any normal flocking stuff (which i find very uncontrollable) but instead has this two level logic, where my battalion order would have me going/currently at and where my local intelligence has told me to be.
 
Call me crazy, but with proper spatial division, I don't think that would be a difficult chore.

I didn't see them say how large the range on chicken avoiding was. That would be the really big performance hit.

...

The closest thing I've done to this, was a demo that I made 5 years ago. Had a sphere of 10k points that had gravity pull to each other within a certain range.. At the start it runs like a dog, given they are all in range of each other, but once they explode it ran ok. It's all just the spacial division as said. And I'm pretty crap at those types of algorithms.
 
Last edited by a moderator:
The effect is that there is high level designer control, but each solider seems fairly intelligent, avoiding things, attacking the player etc.
Its not based on any normal flocking stuff (which i find very uncontrollable) but instead has this two level logic, where my battalion order would have me going/currently at and where my local intelligence has told me to be.

...sounds incredible. Not quite like the chicken farm level of independence, bu tgetting there. A big step up from the other games like this I've played, where it's pretty obvious how many corners have been cut.
 
:eek: The soldiers in that game have liek, 10 polygon's each

We have 65,535 PSONE models.

Hey I didn't say it was HS quality. Anyway I think we are discussing the AI simulations not rendering quality. Rendering 16,000 chickens is not a feat. But depending on the amount of AI logic that needed to be computed each frame (or every couple frames) it could be.
 
Not only 10-polys each, but Ikusagami's quite aggressive LOD meant that after a certain distance (not even that far away), these models actually become just 2D sprites.
 
The army AI in HS is entirely SPU based, its hierarchical with 'battalion' logic (groups of say 200 soldiers) each battalion is running a custom VM programmed in a crude visual programming langauge in our editor. Then a spatial hierarchy breaks up the battlefield into chunks with a number of soldiers in, each chunk is farmed off to an SPU where each soldier runs collision, avoidance and personal AI.
Then afterwards another SPU program, does some work to help sort and farm out work to the renderer... Some of this is done on the PPU more because some of our internal API are PPU based on moving that little bit over to SPU was too much work at the mo.


The effect is that there is high level designer control, but each solider seems fairly intelligent, avoiding things, attacking the player etc.
Its not based on any normal flocking stuff (which i find very uncontrollable) but instead has this two level logic, where my battalion order would have me going/currently at and where my local intelligence has told me to be.

Thats EXACTLY what I wanted to hear :D

Thanks for the great info.

Great work you are putting iin there
 
Then afterwards another SPU program, does some work to help sort and farm out work to the renderer... Some of this is done on the PPU more because some of our internal API are PPU based on moving that little bit over to SPU was too much work at the mo.

Sorry to poke and prod, but does involving the PPU here present any limitations that would not be there if the SPUs were doing this completely independently?

I remember you saying yonks ago about how you were hoping to move a lot of 'army code' off onto the SPUs, and sounds like you've pretty much achieved that, which is nice to hear :)
 
Back
Top