View Full Version : Cell And Ai
Pumpkin Head
06-02-2006, 04:44 PM
--------------------------------------------------------------------------------
Theres been a pretty good debate about how well the Cell architecture will be able to handle Artificial Intelligence. On one hand you have the naysayers, who have stated that Cell will be horrible at AI because of the lack of heavy branch predicting which is one area needed for AI. The debate continues on the IBM Cell forums, and IBM provides some good answers on this subject.
Quote:
A few remarks:
- It is an easy misperception to think of an SPE as a SIMD(vector) only processor. IT IS NOT. Just because we have unified the register file does not mean you have to use SIMD. ( An x86 with SSE or a 970 with VMX is still perfectly ok to use for scalar code and so is the SPE). Compilers support scalar code just fine.
- This SPE implementation has only trivial hardware branch prediction (because large branch prediction structures do not provide a good return on investment in terms of area and power ... better to have more SPEs). Still we do care a lot about idle cycles due to branches, so there is a nice branch hint instruction (architecturally a no-op) that notifies the instruction fetch unit that at address x a branch will end up at address y. Also we support the select instruction that often allows one to eliminate a branch altogether.
- With respect to AI, I don't have the answers, but I have good hope. I think AI is usually not bound by computation but by memory access penalties (on high-frequency processors). I can imagine tree search algorithms for the SPEs that absolutely rock, by getting a lot of memory accesses in flight concurrently. There may be a patent out there by M. Necker and myself that describes some of this for the case of routing table accesses ( also a kind of tree search ).
And you have further comments by programmers and such.
Quote:
As with any vector unit, you do not want to use conditional branches at all
(except for looping). You want to use alternative, branchless, algorithms
whenever possible (and most of the time, it _is_ possible).
This post is why the IBM engineer came in and clarified that you really cannot think of the SPE's are purely a Vector SIMD processor. Someone comes in and states that Cell is actually a MIMD and SIMD processor.
Further comments include :
Quote:
The current "thinking" is that most AI-type code would run on the PPE unit. It is of course possible to run AI on the SPEs, but doing so will require some tuning to avoid performance penalties for branch-heavy code.
Quote:
"AI" is a very broad term that encompasses many different types of computation. Some will be ideal applications for the SPEs, others will have to be performed on the PPE.
Quote:
In terms of AI, Cell may be quite promising for "bottom up" AI, such as artificial neural nets; as for "top down" AI like Lisp's frame based reasoning, we may need more than Cell processors to realize the promises of Minsky et al for this dead-end pseudo-technology.
Programmers are excited and now talking about the influence mapping AI algorithm, which is defined like this
Quote:
An influence map is a spatial representation of an AI agent's knowledge about the world. It allows a computer player to develop a tactical perspective of the current
game state layered on top of the underlying physical/geographical representation of the game environment. An influence map indicates where a computer player's forces are deployed, where the enemy is located or is most likely to be found, where the "frontier" between players lies, what areas remain to be explored, where significant battles have occurred, and where its enemies are most likely to attack it in the future."
Because of how this type of AI is programmed, the SPE's will be ideal for this type of AI algorithm.
So, as you can tell, the Cell processor is indeed very very capable of doing heavy AI, and any AI that is difficult to process on the SPE's will be handled in smaller chunks by the PPE ( and of course the RSX as well )
Heres the IBM Cell forums
http://www-128.ibm.com/developerworks/forums/dw_forum.jsp?forum=739&cat=46
Heres the thread link
http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=739&thread=93069&cat=46
Alot of inside info can be found about Cell through the forums. And much moreso come the end of the year when individual programmers can begin programming for Cell and doing Apps for it. Alot of discussion will occur then.
Hrama
06-02-2006, 04:50 PM
Good analysis pumpkin head. Just kind of reaffirms what we have been speaking about here for quite a while. Cell will be very good at certain types of AI, but it is all still a relatively new concept as far as using such a processor in such a way.
A good find there Pumpkin Head. It really goes to show that the naysayers are thinking narrowly in how AI should/could be implemented.
Zer0-Sum
06-02-2006, 05:56 PM
Good mine my good man. +Rep. It is funny how so many people talk down on Cell because Sony is attcahed to project. So many said it would suck at physics in the beginning. Nope, sorry losers, it rulez at physics. :pepper: Then they said it will suck hugely at AI. Looks like that is a not true either for the most part. :nono:
I bet if it was only IBM that produced the Cell the public sentiment would be diffrent. Sony haters are in high supply these days it seems. Or they are just very vocal and loud.
I think it also a sentiment in the PC programming world that now they have to learn a new way to do things all over again. People hate change for the most part. Cell is change. get used to change programmers, because it is not going away. Notice how programmers used to the PS2 way of doing thigs are just fine with it and have not really voiced negative sentiments over AI and Cell? So lame....
VG Aficionado
06-02-2006, 06:02 PM
Please tell me something, Pumpkin Head: you just copied and pasted that without thinking, didn't you? Because seeing the way you wrote the quotes I'd say you're not the author who actually posted that at PS3forums. You could have put a link to the original source at least.
Pumpkin Head
06-02-2006, 06:53 PM
Yeah I'm not the author, but anybody that loves Sony I will spread the love :shocked:
makeitlookreal
06-03-2006, 04:41 PM
The problem is Sony wants the Cell and it's SPE's to do EVERYTHING!
So far it has physics, sound, AI, raytracing, vertexes for the RSX, etc.
If they force it to do too many things it will just be a useless chip!
What they need to do is add a good sound chip and a good physics chip so more the Cell can be saved for helping the RSX.
PhYmon
06-03-2006, 07:18 PM
Didnt Sony going to introduce an Ageia physics chip?
rpgamer_2k5
06-03-2006, 07:45 PM
MILR, 6 SPE cores plus a strong PPU are more than enough. Sound ops aren't that heavy plus physics could also be done on the GPU as well.
We don't need sound/physics chip, instead more memory would be far better. Like an additional 256MB of XDR Memory. We saw a greater jump in memory for the PSP (4x jump), so 2x jump in size would be great but a 50% increase is just as good. :)
Kabbage
06-03-2006, 08:03 PM
The problem is Sony wants the Cell and it's SPE's to do EVERYTHING!
So far it has physics, sound, AI, raytracing, vertexes for the RSX, etc.
If they force it to do too many things it will just be a useless chip!
What they need to do is add a good sound chip and a good physics chip so more the Cell can be saved for helping the RSX.
Yeah really... what is the point of investing millions of dollars just so we can just limit it, a chip designed for multiple purposes, to a GPU assistant
Why not just stick a pentium 4 in there if you want to make everything stand alone :D
"If they force it to do too many things it will just be a useless chip!" :jonsass:
makeitlookreal
06-03-2006, 10:38 PM
Yes, it will be a USELESS CHIP!
I totally stand by my statement. The Cell could do a couple of things REALLY well, but if they give the PS3 Cell chip SEVERAL things to do at a time it will not do any ONE item as well.
That is a simple FACT!
Right now, it is planned for the CELL to do physics, sound, AI, any raytracing, and help the RSX with vertex work. In my opinion, they are over burdening the Cell chip!
No, they are NOT limiting the Cell chip at all! Don't you realize that the Cell chip is supposed to be used in many, many devices OTHER than the PS3? It will be used for MANY purposes!
But for the PS3 I hope the MAIN purpose of the Cell will be to assist the RSX. Why do you think the PS3 system was built with such an awsome and expensive Flex IO bus that is so many times faster than a PCI bus????
The CELL is supposed to work with the RSX to make TREMENDOUS GRAPHICS.
That is NOT limiting the Cell. It is utilizing the cell to it's most to do one thing VERY GREATLY.
Now, I have no problem with the cell doing MORE than graphics. But when you have half a dozen or more different things being done the Cell is NOT going to do ANY of them GREAT!
I basically see two solutions.
We need a physics chip and a sound chip in the PS3. That way some of the burden could be taken off of the Cell chip.
Or......
We need a second Cell chip to exclusively work with the RSX and let the first Cell chip handle the other tasks.
--
I don't care how powerful you THINK that the Cell chip really is you cannot realistically expect it to do a half dozen different things and do each one supurbly. It is NOT going to happen.
The Cell chip can be used for MANY purposes. But in the PS3 it is designed to first of all work with the RSX. That is a FACT! Sony will still be able to use the Cell for many other purposes in other products. But for the PS3 the Cell is made to assist the RSX. Period.
makeitlookreal
06-03-2006, 10:41 PM
By the way, a Pentium 4 could not even handle a fraction of one task in the PS3. The Cell chip is many, many times more powerful than the PS3, but is being required to do many, many different tasks. What we need are helper chips to take off the load, or add another Cell.
Kabbage
06-04-2006, 12:08 AM
It was made to do all that... it isnt making anything useless LOL
Useless chip
HAHa... that is funny to me
Kabbage
06-04-2006, 12:10 AM
But for the PS3 I hope the MAIN purpose of the Cell will be to assist the RSX.
__________________________________________________ ______________
The CELL is supposed to work with the RSX to make TREMENDOUS GRAPHICS.
Going from hope to facts LOL
And yes one of the functions is assisting graphics... but why cant it still do sound and Physics... that what it was made for
Useless chip LOL
Infernal
06-04-2006, 12:18 AM
The Cell chip is many, many times more powerful than the PS3.
Yah it is! :wave:
liver_kick
06-04-2006, 01:45 AM
Pandemic dev had some interesting commentary about how they're building the AI in Mercenaries 2 from the ground up for the SPU. Here's the quote from the IGN interview.
"Our world is very dynamic and open, and things change a lot," Brown said. "Things gets destroyed, things move around, this faction changes its opinion of this other one -- there's a lot of dynamicism and what that presents is a lot of challenges for the AI. Our AI needs to be so flexible and so able to negotiate its way through the world that we have to have our AI be able to problem-solve on the fly. So we're actually moving a lot of our AI processing onto the SPUs to enable us to do an enormous amount of data processing. The AI does a lot of probing of the world, building a mental map of how the world works, and that's something that we've designed from the ground up to fit on an SPU really well."
http://ps3.ign.com/articles/707/707700p1.html
Perhaps some aspects of influence mapping might be implemented?
On another note, I think its gonna be a treat from a gamers perspective to see how different studios leverage Cell over the next couple years. The learning curve certainly seems like its going to be pretty steep for the 1st generations of software, but as experience and documentation improve Cell's versatility and performance will continue to evolve in some pretty exciting ways I imagine.
Zer0-Sum
06-04-2006, 07:00 AM
The learning curve for PS2 was steep as well. Many devs struggled for years on creation of code for the EE chip. But look at it now. We all know what is up with graphics on PS2. The EE is getting things done that we never imagined it would ever be able to do. The Cell will be no different, just with better support tech docs from Sony and IBM than devs got for the EE in the PS2. In five years our jaws will be hanging like statrtled school childeren at the amazing things we will see come from PS3. I just want to sit back and enjoy the ride now.
makeitlookreal
06-04-2006, 08:34 AM
The Cell is a useless chip if it cannot perform it's functions to the maximum. We have six SPE's and for any process to be done very well it will probably take at least a few of them. By the time you add in sound, physics, AI, any raytracing, vertex data, and other functions you are limiting how well any of them will work.
If we overload the Cell with too many functions then it will perform poorly overall!
Have you read the reports of developers fiddling around with Cell? Almost all of them have to use more than one SPE for a specific function. For physics, AI, or graphics to be good you have to use several of the SPE's. Then if you do that you run out of them! What about sound? oops.. no SPE's left. Well there is something that needs to be raytraced... oooops... no SPE's left. What about some extra Vertex data for the RSX? oooops no SPE's left!
The Cell is a useless pathetic chip if we over burden it with every process under the sun! If we use it's resources wisely it can be an amazing chip with lots of power. But if we desire to force *everything* to be done by the PS3 it is going to become useless.
You might be a good baseball player, but if your the pitcher, coach, score keeper, water boy, and camera man you are going to be poor at every single job!
Basically, I want to know what number of SPE's are needed to provide the RSX with the max number of vertexes it can practically utilize. Then we know how many SPE's we have to work with. From there we can delegate them appropriately. However, if functions such as physics would take too many SPE's and limit another function we need another solution such as a seperate physics chip, sound chip, chip to handle the OS, or a second Cell processor.
For goodness sakes, we have not even considered how developers might need to utilize the Cell to decode data from the Bluray drive!
Seriously, the Cell is an awsome piece of hardware. But if we cram it with too many jobs to do it is going to start sputtering and do nothing that well at all.
Zer0-Sum
06-04-2006, 08:44 AM
Seriously makeitlookreal, are you a progammer? A developer? Have you suddenly read something that says the devs are running out of power with Cell that we all missed? What is the deal? I know you have an opinion of what Cell can or cant do, but it seems like you are trying to hammer it in like it is fact. Which it is not. Everythimg I have seen or read about Cell and the power it yeilds is saying that devs are barely touching it's full potential. That they are fully excited about the raw horse power. That Cell is designed from thr ground up to work on all kinds of things all at once. If I am wrong on this, someone please let me know. So what is your deal? Your possts are becoming a trifle annoying.....
makeitlookreal
06-04-2006, 09:54 AM
deadboyz,
I have read several articles in which people were utilizing the Cell for different things such as physics, AI, and other functions. Each time they were using multiple SPE's for the specific function. No developer has came fourth to give us a lot of details about such things, but it is obvious from what I have read that to get the Cell doing *many* things you have to give up at least some quality of each.
Obviously, SPE's are designed to work best when they are working together on an individual process whether it is physics, AI, or so fourth. The work of two SPE's working together is greater than each one working by itself. To get the best results from Cell you need to more than one working on each process.
Until someone comes out and tells the world, "Look at this game, it is even better looking than MGS. All we need is one SPE for all the vertex data the RSX could ever possibly utilize, all the physics we could ever put in a game, the best possible sound, intelligent AI, one for decoding the compressed data from Bluray, and another for some other feature" I am going to be very skeptical about getting the Cell chip to do too many things at once.
Don't get me wrong. I am sure it could do many things at once and do them decently enough to get a game working. But if we want the best possible games from the PS3 we can't pretend we can just put one SPE on each task and get fantastic results from everything. It's not going to happen.
venomv
06-04-2006, 02:41 PM
But all the processorers handle that stuff, minus the graphical stuff normally. If it included a physic chip and a sound chip then it would cost tons more, putting out of reach for a lot of people and would destroy sales. As soon as the devolopers get the hang of it they will be able to do more, they are just shooting in the dark at the moment.
Angeljuice
06-04-2006, 03:23 PM
MILR, you don't know how it works (I admit that neither do I), perhaps more can done simultaniously than you're aware of, I'm sure it's not as simple as adding up spe's that developers say they're using for tasks and coming up with a catastrophe. The cell was designed as a multicore processor, it is designed for the very purpose of performing multiple tasks simultaniously and doing it well.
As some developers are saying that 1st gen games are using a fifth of the potential power of the PS3, I really don't understand your concerns.
MLR, I guess we need to take the opinion of CPI.
If you ask me, CELL can do all the things without any problem because CELL architecture and its underpinning philosophy is different from the existing CPU. But again, I come from the background where anything is possible as long as the programmers do it. So CPI being a programmer is better suited to comment on it.
Also Peter Hostfee, is the lead architect of CELL and I believe he knows what he is saying... :)
To answer you concern, yes its quite possible for CELL to do everything as long as the programmers specifically write for CELL, but its not easy to program. But once mastered CELL would definitely shine...
The_One
06-04-2006, 05:21 PM
Nvm
xbdestroya
06-04-2006, 06:00 PM
Good finds Pumpkin Head and Liver Kick. It'll be interesting to see how AI ends up looking five years from now on Cell/SPE-based model when compared to XeCPU models.
Domination
06-04-2006, 07:31 PM
Yes, it will be a USELESS CHIP!
I totally stand by my statement. The Cell could do a couple of things REALLY well, but if they give the PS3 Cell chip SEVERAL things to do at a time it will not do any ONE item as well.
That is a simple FACT!
Right now, it is planned for the CELL to do physics, sound, AI, any raytracing, and help the RSX with vertex work. In my opinion, they are over burdening the Cell chip!
No, they are NOT limiting the Cell chip at all! Don't you realize that the Cell chip is supposed to be used in many, many devices OTHER than the PS3? It will be used for MANY purposes!
But for the PS3 I hope the MAIN purpose of the Cell will be to assist the RSX. Why do you think the PS3 system was built with such an awsome and expensive Flex IO bus that is so many times faster than a PCI bus????
The CELL is supposed to work with the RSX to make TREMENDOUS GRAPHICS.
That is NOT limiting the Cell. It is utilizing the cell to it's most to do one thing VERY GREATLY.
Now, I have no problem with the cell doing MORE than graphics. But when you have half a dozen or more different things being done the Cell is NOT going to do ANY of them GREAT!
I basically see two solutions.
We need a physics chip and a sound chip in the PS3. That way some of the burden could be taken off of the Cell chip.
Or......
We need a second Cell chip to exclusively work with the RSX and let the first Cell chip handle the other tasks.
--
I don't care how powerful you THINK that the Cell chip really is you cannot realistically expect it to do a half dozen different things and do each one supurbly. It is NOT going to happen.
The Cell chip can be used for MANY purposes. But in the PS3 it is designed to first of all work with the RSX. That is a FACT! Sony will still be able to use the Cell for many other purposes in other products. But for the PS3 the Cell is made to assist the RSX. Period.
I agree somewhat. But I guess it depends on what's going on exactly. From what's been mentioned, the Cell has seven opperational SPEs (six for game code) and a PPE. If it's true that the PPE is capable of pulling off two threads at once, along with each SPE (6 for game code) handling one each, that gives you eight functional threads to play around with. From what I'm hearing, though, developers (once they wrap their heads around the archchitecture) will be able to fully program each SPE to continue tackling tasks so that no single slave stands idly by after a certain job/task is finished or being used at the time. So yes, I do believe developers right now could more easily run into such a bottleneck compared to those in the distant future. Generally speaking, though, you will get a little more (maybe even a lot, depending on the situation) than what's being done now, which is still excellenct from what I am already seeing. :)
Arnaud_M
06-04-2006, 09:00 PM
MILR, you must keep in mind that when a developer says "we are using 2 SPU for task X", that does not necessarily mean "task X is consuming 100% of 2 SPU all of the time". More often, that means "we have been able to parallelize this big task in two smaller tasks, and it was sufficiently difficult for us to synchronize those 2 smaller ones that we did not try to split them further, oh my god now at least we do not have any more deadlocks :-)".
You have to distinguish Peak consumption and Average consumption! A task may very well needs 100% of 2 SPU, but only 10% of the time. Take for instance AI, and more specifically path finding: you may need a huge amount of SPU power for path finding (for say all the currently visible monsters at once), but only once every 30 or 60 frames. Those same 2 SPU could perform something else entirely the remaining of the time (with some context switching cost, obviously, but this is not as dramatic as having the 2 SPU dead in the water!).
Arnaud
Smokey
06-04-2006, 09:26 PM
well put i reckon Arnaud_M :)
GTShotoKen
06-05-2006, 11:41 PM
MILR, you must keep in mind that when a developer says "we are using 2 SPU for task X", that does not necessarily mean "task X is consuming 100% of 2 SPU all of the time". More often, that means "we have been able to parallelize this big task in two smaller tasks, and it was sufficiently difficult for us to synchronize those 2 smaller ones that we did not try to split them further, oh my god now at least we do not have any more deadlocks :-)".
You have to distinguish Peak consumption and Average consumption! A task may very well needs 100% of 2 SPU, but only 10% of the time. Take for instance AI, and more specifically path finding: you may need a huge amount of SPU power for path finding (for say all the currently visible monsters at once), but only once every 30 or 60 frames. Those same 2 SPU could perform something else entirely the remaining of the time (with some context switching cost, obviously, but this is not as dramatic as having the 2 SPU dead in the water!).
Arnaud
Your statements put things into a very logical perception. The gloom and doom preached by MILR was confusing me quite a bit (no attack towards you MILR...I was just using a figure of speech).
I was thinking certain operations performed by the cpu didn't need to use 100% of its power or be executed 100% of the time. I don't know much about the interworkings of a cpu on an advanced level so I couldn't really come to a clear conclusion (I guess that's why I'm going to study Computer Hardware Engineering at college).
vBulletin® v3.6.7, Copyright ©2000-2008, Jelsoft Enterprises Ltd.