Jump to content
A Sprite

Jaguar AI - smart enough to play dumb?

Recommended Posts

With multiple processors, is it possible to simulate stupidity on the Jag?

 

Let me explain.

 

Assume a racing game.

 

You take the lead from someone. Most AI drivers don't realize this. They continue on their merry path as if they were a merry go round. In other games that simulate human emotion, a little box is checked, and a you now have a rival.

 

This is all very predictable.

 

But what if -

 

You pass the driver too close, nobody special, he's in the back, unlikely to win, and a processor kicks in with a new AI prompt of "Stay Alive!" You hear the other driver say "Shit!" spin out due to their overreaction, and maybe crash into someone else.

 

Now it's like real racing.

 

Another AI, based on that exact same prompt, decides that you're interesting - you try to pass them, and they speed up a little. You get too far ahead, and they start taking risks to catch up.

 

Lap them, and suddenly, they turn into a Sunday driver...

 

Now add this kind of emotional decision making to the ability to ignore emotions in the AI of the better drivers, and respond on the fly to the chaos with on the fly enviromental awareness, and learned behaviors, and suddenly every racer has their own story, as much as if this were an RPG.

 

Or real life.

 

Can the jag do it?

Edited by A Sprite

Share this post


Link to post
Share on other sites
With multiple processors, is it possible to simulate stupidity on the Jag?

This question makes about as much sense as, "With multiple pencils, is it possible to write a jaunty limerick on notebook paper?"

 

What you're attempting to describe is roughly known as a finite state machine AI. And of course the Jag can do it. ANY game system can do it. It's just an algorithm, after all.

Share this post


Link to post
Share on other sites
With multiple processors, is it possible to simulate stupidity on the Jag?

This question makes about as much sense as, "With multiple pencils, is it possible to write a jaunty limerick on notebook paper?"

 

What you're attempting to describe is roughly known as a finite state machine AI. And of course the Jag can do it. ANY game system can do it. It's just an algorithm, after all.

 

Yes, but most game machines do it prescripted to one variable at a time, don't they? I'm asking if it's possible to run it more like a human brain, where different AI codes are running to handle different tasks simultaneously, without slowing down the gameplay.

Share this post


Link to post
Share on other sites

More seriously, most machines could pull off that kind of AI - certainly any that can manage tracking the individual state of each vehicle (as opposed to those that just react or just follow a pre-defined path) - what you've essentially done is described a state machine at a very high level.

 

The bigger challenge with AI is coming up with a set of rules that's simple enough to describe to a computer, but complex enough to be believable to the player.

 

A list of states like you list there is actually a good place to start. Then you keep breaking it down to lower and lower detail till you have enough information to program. For example, you might take your comment about "You get too far ahead, and they start taking risks to catch up", and note it as "reduce margin (against maximum safe speed) by 5%" - now your engine drives that AI faster and is closer to the edge in turns.

 

You came up with some neat ideas there, it's a good place to start.

Share this post


Link to post
Share on other sites
With multiple processors, is it possible to simulate stupidity on the Jag?

 

 

Yes. And it will be the smartest stupidity you ever did see....

(waiting for the eggs to fly! :P )

 

No...really.... anything you want can really be done on any system. The Jaguar has

the advantage of splitting the work up between three( I recommend two

the DSP and GPU only) and will allow for more complex AI with less strain

on either processor. Scott and Doug are using all three but suposedly sparingly

on the 68k to keep it off the bus when possible.

Share this post


Link to post
Share on other sites

I understand what you mean by "play dumb." I do that in games like Mario Kart DS because the leader always takes the worst hits. I'd rather stay in 2nd place for most of the race up until the very end. Then I zip past the leader to win. :D

Share this post


Link to post
Share on other sites
With multiple processors, is it possible to simulate stupidity on the Jag?

 

Multi-processor stupidity like failing to include even a single line of 'cache' memory in the 68000's memory interface? Or is that actual, not simulated?

 

You are suggesting that a game try to make the AI seem less 'mechanical'. Many games have employed such techniques for years. Compare the behavior of monsters in Quake to those in Doom, for example. And of course those games are by now considered ancient (is Quake ten years old yet? I think it is...)

 

One difficulty is having the 'interesting' behaviors be somewhat random, but still remain sensible. Trying to create such behaviors is both an art and a science. It doesn't require a whole lot of processing power, but what it does require is a strong sense of whether behavior 'feels' right, and if not, exactly what is wrong with it.

Share this post


Link to post
Share on other sites
You haven't played BS/BSG have you. ;)

 

That´s what I thought also. The behavior based AI scheme of BattleSphere is bloody awesome.

I seem to remember Doug saying something about ScatoLOGIC giving the enemy pilots various degrees of short tempers. :)

 

I´ve experienced this firsthand a couple of times. It´s just amazing to be able to relax for just a short while, while the enemies duke it out with each other due to "friendly fire" happenings.

Edited by Palmer Eldritch

Share this post


Link to post
Share on other sites
Yes, but most game machines do it prescripted to one variable at a time, don't they? I'm asking if it's possible to run it more like a human brain, where different AI codes are running to handle different tasks simultaneously, without slowing down the gameplay.

If your AI calculations can finish quickly enough that they don't impact the frame rate, it doesn't make a bloody bit of difference whether the AI code is running on one CPU or a thousand. It's just programming.

 

You seem to have a fundamentally confused mental model of how this stuff works.

Share this post


Link to post
Share on other sites
Yes, but most game machines do it prescripted to one variable at a time, don't they? I'm asking if it's possible to run it more like a human brain, where different AI codes are running to handle different tasks simultaneously, without slowing down the gameplay.

If your AI calculations can finish quickly enough that they don't impact the frame rate, it doesn't make a bloody bit of difference whether the AI code is running on one CPU or a thousand. It's just programming.

 

You seem to have a fundamentally confused mental model of how this stuff works.

 

So you're saying that it makes no difference on the performance speed available whether one processor is watching over the calculations of another, or one processor is set to watch it's own code, looking for patterns? Do explain how that works. Use little words, please, so you can follow what you're saying.

Edited by A Sprite

Share this post


Link to post
Share on other sites

My fault. I should have been clearer.

 

I'm asking about the potential for real time large scale pattern recognition, and creating in code, associative thought (If x=y at z for the nth time) and associative responses ( Z then triggers a code that creates a behavior change, even if X and Y aren't present, because of T.) Only much more complex than that. This is how basic emotional thinking works in the human brain, and if it's so easy to do, why don't more games get credit for their emotional intelligence?

Edited by A Sprite

Share this post


Link to post
Share on other sites

Throwing out ideas to ponder..

 

3D array. Collect and store data, as more data is collected, patterns become readily obvious just by looking at the array matrix. Scan with a subroutine to pick out the pattern defining hot spots. Same matrix can provide the variable data for what the behavior change should be relative to hotspot trigger and stored pattern history.

 

Arrays are not very taxing from a data access standpoint. They can be a memory hog tho.

 

Disclaimer: Last thing I actively programmed for was a C-128 like 6 years ago. :P

Share this post


Link to post
Share on other sites
Throwing out ideas to ponder..

 

3D array. Collect and store data, as more data is collected, patterns become readily obvious just by looking at the array matrix. Scan with a subroutine to pick out the pattern defining hot spots. Same matrix can provide the variable data for what the behavior change should be relative to hotspot trigger and stored pattern history.

 

Arrays are not very taxing from a data access standpoint. They can be a memory hog tho.

 

Disclaimer: Last thing I actively programmed for was a C-128 like 6 years ago. :P

 

Can the memory be compressed? Like if a result of A is returned x times in y lines, then B is a variable at Z, and a,x, and y are discarded? Apologies, if that makes no sense...I'm learning as I go...

Share this post


Link to post
Share on other sites
You haven't played BS/BSG have you. ;)

 

That´s what I thought also. The behavior based AI scheme of BattleSphere is bloody awesome.

I seem to remember Doug saying something about ScatoLOGIC giving the enemy pilots various degrees of short tempers. :)

 

I´ve experienced this firsthand a couple of times. It´s just amazing to be able to relax for just a short while, while the enemies duke it out with each other due to "friendly fire" happenings.

 

Interesting man :) , didn't know that, it sure does seem like some pilots have a worse temper when they visciously attack your ship and start blasting you out of nowhere, and make it hard to aim and return fire. AI is easily the heart of this game, and any game. Because without good AI, games aren't much fun, they just seem like simple graphics demos.

Share this post


Link to post
Share on other sites
You haven't played BS/BSG have you. ;)

 

That´s what I thought also. The behavior based AI scheme of BattleSphere is bloody awesome.

I seem to remember Doug saying something about ScatoLOGIC giving the enemy pilots various degrees of short tempers. :)

 

I´ve experienced this firsthand a couple of times. It´s just amazing to be able to relax for just a short while, while the enemies duke it out with each other due to "friendly fire" happenings.

 

I've never played Battlesphere, but it was Gorf's description of it that led to the question.

 

I know psychology, learning neurology - Tursi got what I'm going for, but I don't know the Jag well enough to know what it can do - how complex an AI it can run, how many variables can be tracked, etc?

 

For instance, can the AI track and respond to other AI responding to the physics data, and plan how to exploit it, with varying degrees of accuracy, given this - ?

 

Some racing games only run their physics at 60 hertz – the same frequency as their graphics. This means that the in-game physics only update 60 times per second. 60 may sound pretty fast, but let me give a more concrete example. Let’s say a car is traveling at 200 mph or 98.4 meters per second. At 60 updates per second, that car travels almost 1.6 meters (5.38 feet) between each update of the physics engine. As you can imagine, a lot can happen in 1.6 meters of travel.
Edited by A Sprite

Share this post


Link to post
Share on other sites
Yes, but most game machines do it prescripted to one variable at a time, don't they? I'm asking if it's possible to run it more like a human brain, where different AI codes are running to handle different tasks simultaneously, without slowing down the gameplay.

 

If your AI calculations can finish quickly enough that they don't impact the frame rate, it doesn't make a bloody bit of difference whether the AI code is running on one CPU or a thousand. It's just programming.

 

 

 

Right and that is why having yet an extra CPU or two will make the difference in AI complexity as in BattleSphere's case.

Share this post


Link to post
Share on other sites
So you're saying that it makes no difference on the performance speed available whether one processor is watching over the calculations of another, or one processor is set to watch it's own code, looking for patterns? Do explain how that works. Use little words, please, so you can follow what you're saying.

 

 

No he is saying you do not HAVE to have more than one processor to do complex AI if you have enough room to

maintain the frame rate.. AI variables are locations in memory. You can have as many AI variables as you have

memory locations. More processors will allow for more complex AI in parallel with SFX and GFX. PSX and N64

only have one such gen purp CPU and must do it all on those chips while maintaining a decent frame rate. The

support hardware take a lot of work from the CPU's which would otherwise work 3 to 4 times harder without it.

Share this post


Link to post
Share on other sites
This is how basic emotional thinking works in the human brain, and if it's so easy to do, why don't more games get credit for their emotional intelligence?

 

The real problem is rarely processing power - although more never hurts - it's the creativity of the programmer building the algorithm. ZyloneBane made an excellent point by pointing out it's a combination of art and science to come up with believable behaviour. Most programmers, as a grand stereotype not aimed at anyone I know online, are barely competent at putting code together, let alone being creative with it. Few teams have an AI designer, so that's who gets to put the 'intelligence' together.

 

That said, it can be remarkable how *little* it actually takes to create complex behaviour. You can think of personalities in terms of a D&D stats sheet - rather than strength, skill, etc, you might have stats like randomness, persistence, bravery - and assign them to specific actions. By combining these values each time the AI state is re-evaluated, you can have a character who is unpredictable (high randomness), who stalks the player relentlessly (high persistence), who runs from the player (low bravery), or interesting combinations - an AI with high persistence but low bravery might stalk the player relentlessly but turn and run the instant the player faces them. There is a *great* thread here on AA that discusses the AI of the PacMan ghosts in remarkable detail - that's an excellent example.

 

Multiple processors always sounds great on paper but programming them is an increase in complexity. In some cases, poorly planned, it can actually hurt your performance. A single processor running at 50MHz will almost always outperform two processors at 25MHz, just due to the logic of running them together. Multiple processors are best utilized working on competely different tasks so they don't interfere with each other. (For example, if both are reading and updating a data table, you need a synchronization method to ensure one doesn't trash the data that the other is working with... though if they are both only reading it's simpler. However, if one is dedicated to studying the dataset to provide AI hints, while the other runs the game logic, they are less likely to conflict while the preformance benefit is still realized.)

 

The Jaguar's architecture makes efficient concurrent use of the processors difficult, there's a lot you need to keep in mind. The bus is heavily contested and unless you put the 68000 to sleep, it's pretty much overcommitted. The DSP has issues to keep in mind if you want it it to access external memory, and so generally it runs in it's own little world. That leaves the GPU as the powerhouse of the machine, and despite all it has, it still needs to share the bus with at least the OP.

Share this post


Link to post
Share on other sites
This is how basic emotional thinking works in the human brain, and if it's so easy to do, why don't more games get credit for their emotional intelligence?

 

The real problem is rarely processing power - although more never hurts - it's the creativity of the programmer building the algorithm. ZyloneBane made an excellent point by pointing out it's a combination of art and science to come up with believable behaviour. Most programmers, as a grand stereotype not aimed at anyone I know online, are barely competent at putting code together, let alone being creative with it. Few teams have an AI designer, so that's who gets to put the 'intelligence' together.

 

That said, it can be remarkable how *little* it actually takes to create complex behaviour. You can think of personalities in terms of a D&D stats sheet - rather than strength, skill, etc, you might have stats like randomness, persistence, bravery - and assign them to specific actions. By combining these values each time the AI state is re-evaluated, you can have a character who is unpredictable (high randomness), who stalks the player relentlessly (high persistence), who runs from the player (low bravery), or interesting combinations - an AI with high persistence but low bravery might stalk the player relentlessly but turn and run the instant the player faces them. There is a *great* thread here on AA that discusses the AI of the PacMan ghosts in remarkable detail - that's an excellent example.

 

Multiple processors always sounds great on paper but programming them is an increase in complexity. In some cases, poorly planned, it can actually hurt your performance. A single processor running at 50MHz will almost always outperform two processors at 25MHz, just due to the logic of running them together. Multiple processors are best utilized working on competely different tasks so they don't interfere with each other. (For example, if both are reading and updating a data table, you need a synchronization method to ensure one doesn't trash the data that the other is working with... though if they are both only reading it's simpler. However, if one is dedicated to studying the dataset to provide AI hints, while the other runs the game logic, they are less likely to conflict while the preformance benefit is still realized.)

 

The Jaguar's architecture makes efficient concurrent use of the processors difficult, there's a lot you need to keep in mind. The bus is heavily contested and unless you put the 68000 to sleep, it's pretty much overcommitted. The DSP has issues to keep in mind if you want it it to access external memory, and so generally it runs in it's own little world. That leaves the GPU as the powerhouse of the machine, and despite all it has, it still needs to share the bus with at least the OP.

 

Thank you, for explaining that. If it's not too much trouble to answer, would it benefit anyone if I were to attempt to further carry out turning human behaviors into simple codes that could be handled as you describe? I have no intention of asking anyone to make anything, only do what I can, if anything, as a non-coder to help the Jaguar development community.

Edited by A Sprite

Share this post


Link to post
Share on other sites
If it's not too much trouble to answer, would it benefit anyone if I were to attempt to further carry out turning human behaviors into simple codes that could be handled as you describe? I have no intention of asking anyone to make anything, only do what I can, if anything, as a non-coder to help the Jaguar development community.

Feel free, as long as you understand that what you'd be doing would be about as helpful as taking a cardboard box, drawing "RACE CAR" on the side with a magic marker, then giving it to an automative engineer.

 

Programmers are humans too, you know. The tricky part of good AI isn't figuring out how a human would act, it's getting the AI to actually act that way. And that involves math. Lots and lots and lots of math.

Share this post


Link to post
Share on other sites

Yes mutli prcessors do increase the level of difficulty but done right can yield very worthy results.

 

Battle Sphere is plenty of proof how strong AI on a mutliprocessor sytem is with someone as

knowledgable as Scott Legrand behind it....Shit...I think I heard he's applying for ten hardware

patents or something ridiculous like that. Keep in mind that the more you add consoles to a

BattleSphere network the more the AI splits itself up among the consoles. Its rather ingenious.

Edited by Gorf

Share this post


Link to post
Share on other sites
Programmers are humans too, you know. The tricky part of good AI isn't figuring out how a human would act, it's getting the AI to actually act that way. And that involves math. Lots and lots and lots of math.

 

Now I disagree with Zylon. (hehe) AI can be implemented without lots and lots of math with a well-defined state machine. :) And you'd be surprised how hard it is to figure out how a human might act when you have to break that behaviour down into states and steps. :)

 

Thank you, for explaining that. If it's not too much trouble to answer, would it benefit anyone if I were to attempt to further carry out turning human behaviors into simple codes that could be handled as you describe? I have no intention of asking anyone to make anything, only do what I can, if anything, as a non-coder to help the Jaguar development community.

 

I think it may be an interesting and useful exercise. There's no intent or expectation that anyone will ever use it, but it may provide a spark to someone wondering how they might do something.

 

IMO the discussion is more useful at a higher level and not narrowed down to the spec of any particular console. I'd be happy to work with you on the concept here. :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...