"Massive" Simulation AI

Blitz3D Forums/Blitz3D Programming/"Massive" Simulation AI

Tyler(Posted 2005) [#1]
I haven't delved too deep into the capabilites of Blitz as far as AI goes, but I'm curious as to if it can handle complex decisions like Lord of the Rings Massive system. It must have hundreds, maybe thousands, of ways of handling a situation. That's just one agent alone, when you add more, aware of everyone and thing around them, I imagine it could be processor hectic.

Just curious is anyone has messed with this idea yet. I want to try to develop one intelligent agent that is aware of obstacles (without the use of actual nodes) in realtime, then give it a purpose (search for blue cube?) then try to get it to react to another agent with the same sets up basic thinking patterns. If anyone knows of any good online tutorials aimed at AI, I'd appreciate it.


FirstTheIdea(Posted 2005) [#2]
Keep it simple. Is best tip anyone can give you, AI isn't about working everything out in one hit it all done in stages.


Rook Zimbabwe(Posted 2005) [#3]
drunkards loop and the like...
RZ


Bouncer(Posted 2005) [#4]
Good luck on even making a basic path-finding / navigation without some sort of nodes... :)

Maybe you should read basics first...


Tyler(Posted 2005) [#5]
In theory, it seems simple enough to have a thought process for each action. Maybe not completely without nodes, but with dynamic nodes. For example ... Walk -> Think (Send out a check for obstacles in 8 directions) - Check objective - Choose direction that appears shortest -> Begin movement -> Adjust according to assumption and new obstacles -> Dead end = Stop and rethink next short path.

Ok ... maybe not SIMPLE ... but anything I can put into words seems possible with blitz :) It's just cool like that.


Rob Farley(Posted 2005) [#6]
Something I've learnt by doing a bit of AI is that you want each stage of thinking to be in a single game loop, and if possible make each AI player think in turn.

IE, 5 AI players

Game loop
Player 1, looks left and sees it's blocked
Game loop
Player 2, looks left and sees it's clear
game loop
player 3, looks left and sees it's blocked
..
..
..
Game loop
Player 1, knows left it blocked so looks right, right is clear.
game loop
Player 2, moves left

etc etc.

This way, you don't kill your game loop cycles and keeps it tight. Also, I keep my game logic at around 120 updates per second so even if you're cycling through a few baddies they don't stand around thinking for ages. Of course you can update more than one per cycle and do more than one stage of logic per cycle.

Anyway... That's me.


IPete2(Posted 2005) [#7]
To answer the question can Blitz handle LOTR style massive AI system...I think it can if you plan carefully before you begin.

We produced a motorway simulation which had upto 800 cars whose AI was all being looked after using types.

The cars AI had to deal with 4 lanes of traffic and 4 different scenarios, speeding up slowing down in time so as not to have a crash, dealing with the players decisions, dealing with speed and lane restrictions, indicators and brake lights, various individual vehicle parameters such as how many wheels, what speed they were turning etc, etc.

Blitz was able to cope absolutely fine with it's eyes closed and room to draw those vehicles which were in view along with all the other stuff going on around it.

You should really work out every parameter you are ever likely to need and build it into a type and perhaps have types within types even.

Mousey had to re-write the main core of this system 4 times before he had it working to a standard he wanted...what a talented chap!

The result was fabulous! realistically moving and thinking vehicles - hundreds of them!!!!

IPete2.


Tyler(Posted 2005) [#8]
Thanks for the insight! I appreciate it. I just want one "free thinking" agent, motivated by something to begin with. Then I'd like to expand the system to handle two agents. Make them aware of each other. Try to get the to interact in some way. Then expand rapidly from there. I can imagine it's gonna take me some time to flesh out what all I want to be able to do. I imagine if it ever became expanse enough, it would make an excellent AI library to sell for blitz. Thanks everyone!


poopla(Posted 2005) [#9]
Neural nets, all the way ;). Hey... they aren't actually as tough as people think :P.


_PJ_(Posted 2005) [#10]
MassiveSoftware's tool is an incredible piece of kit, really. Although the logic behind it is really possible for anyone to synthesize.


The only limitations are:


can you program the complexity of the AI required?

can you make it so it runs fast enough?

there was an article on popsci.com on how the LOTR AI worked, but it seems to give an error 404 now.


John Blackledge(Posted 2005) [#11]
Tiler, I think IPete2 has proven his points about numbers and complexity. Very possible in Blitz.
For myself, I've had 20 characters simultaneously walking around, bumping into each other, saying 'Excuse me' etc.

Start simple.
Think in 'pseudo-logic'.
Don't try to code too soon.
Instead sketch out flow charts of logic/actions/reactions.

And always, when you start coding the test character remember to leave your code open-ended enough so that when when you are ready you can just change a vaiable to load in ten of the buggers.


John Pickford(Posted 2005) [#12]
Stuff like that is quite possible. One of the first things I wrote in Blitz was a demo with something like 80,000 blokes walking around a map.


Paolo(Posted 2005) [#13]
I think the problem is not moving "enemies" around the level ... It is the interaction of the enemies with your character ...

Have you seen the AI in Far Cry?,
anyone know if it is too complex, because I really like the way they the enemies detect you and run just behind a tree ... or a rock ... or whatever ... :)


Tyler(Posted 2005) [#14]
What i'm aiming for ultimately is an interaction of combat. I figured out that each agent will need part to be made of, that can be randomly mixed and matched, and each agent will have a "catalyst" attatched to certain joints. The catalyst will be their way of interacting. If the agent goes up to a another and swings his sword (the catalyst) a simple collision detection will determine whether he's been struck, and how to react. As well, there will be a sense of observation, as one agent will know when to block the other (not always succesfully, and in a variation of pre-animated ways)

It sounds so fun, can't wait to get my psuedo-code pages done (on page 3 now) Thanks everyone.


Craig H. Nisbet(Posted 2005) [#15]
I've seen massive in action personally. The interface is almost identical to a game package called Mind Rover. It also throws in some fuzzy logic stuff just to make the system generate more random AI. It's really not much more then large scale game AI. I think your basic RTS has more complex AI then massive. That's a guess though from what I saw. I never had the chance to actually mess with it, they wouldn't let me.