Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Newbie Questions
by AndrewAMD. 12/04/23 11:14
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
2 registered members (TipmyPip, izorro), 556 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: [AI] : advice on FSM structure and transitions [Re: demiGod] #116220
03/10/07 19:56
03/10/07 19:56
Joined: Feb 2004
Posts: 217
Wennigsen, Germany
Gordon_Shumway Offline
Member
Gordon_Shumway  Offline
Member

Joined: Feb 2004
Posts: 217
Wennigsen, Germany
Hey again !!!

Why do you need a mastermind? It's a good question.
First of all there are lot of possibilöities to script such an AI.
I would use in most of the cases a mastermind, because all actions are relative easy to handle, but it depends on your game.

If you're scripting a soccer game, for example, all of your teammembers could:
run
pass the ball
shoot
defend
support defender
support attacker.....

So, if you're using a mastermind, it's in my opinion easier to switch between different situations. For example:
One entity got the ball, than he could send a message to the mastermind "Hey I've got he ball". The mastermind switches the status from defence to attack.
All the other entity except the one who has the ball could now support the attacker. And so on....A supporter is near the goal and free and if you're using a weighting something like if a value for passing is 1, the player will allways pass the ball to him, and if it's ZERO passing wouldn't be a good idea and in between ? The player with ball sees an denfender in front of him, so he has to decide shoot to the goal or pass the ball. A simple question to the mastermind "what's best?" And the masterminds says there another player free near the goal the weighting is very high - it's a good idea to pass the ball.....
If you're not using a mastermind this would be like, "Hey player1 what's your weighting?"-"My weighting is 0.35"-"Hey player2, whats your weighting"-"My is 0.8"-"Hey player3 what's your weighting?"-"My weighting is 0.15....-"Hey player11, whats your weighting"-"My is 0.55"

I hope you understand what I mean, you could scipt all without a mastermind, but I would use on because it's easier to use a mastermind.

Bye G.S.


***Neue Webseite!! Mit vielen neuen Infos! http://www.2662-thegame.de.vu***
Re: [AI] : advice on FSM structure and transitions [Re: Gordon_Shumway] #116221
03/10/07 20:25
03/10/07 20:25
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline OP
User
demiGod  Offline OP
User

Joined: Mar 2006
Posts: 752
Portugal
Hello again Gordon,

Another very good explanation you gave, thanks.

Maybe i am making some confusion, but this mastermind couldnt be the team AI state machine? You see, depending on the state the team is, it will send messages to the respective players that belongs to that team, but ..ahh, so if the players dont send messages to team there will be a problem, so thats because we need a mastermind, or not?

Sorry, but i didnt understood very well the concept of the mastermind yet..

The book you mentioned above refer to a global player state that works like a message router, is that you are calling the mastermind?

Thanks.

Last edited by demiGod; 03/10/07 20:32.
Re: [AI] : advice on FSM structure and transitions [Re: demiGod] #116222
03/10/07 21:14
03/10/07 21:14
Joined: Feb 2004
Posts: 217
Wennigsen, Germany
Gordon_Shumway Offline
Member
Gordon_Shumway  Offline
Member

Joined: Feb 2004
Posts: 217
Wennigsen, Germany
A mastermind is something like a communication interface, which also could decide what to do.

All important informations will be send to the mastermind by any teammember. Every teammember could also ask the mastermind for special informations (like who is the best player for passing? Or is shooting to the goal the best solution ?)
If you don't use a mastermind, every teammember has to ask all the other teammembers for a certain information. Just a simple example think about who has the ball ?(ok, it's not a very good example, because you could easily script it with a handle, but it show the difficulty of you're not using a mastermind)
Player1 ask Player2 - D'you have the ball? - NO
Player2 ask Player3 - D'you have the ball? - No...
...Player2 ask Player11 - D'you have the ball? - Yes - Ah good, I will support you.

Then Player11 passes the ball to player5.
So player11 has to send to all other player the message I'dont have the ball anymore.

Then all starts again
Player1 ask Player2 - D'you have the ball? - NO
Player2 ask Player3 - D'you have the ball? - No...
.....
...
And you have to do this for all Players !!!!!!

If you're using a mastermind:
Player11 send message to mastermind - "I've got the ball"
Player1 ask mastermind - "Who has the ball" - "Player11 has the ball" - "Ok I will support him" or
Mastermind send messages to all players - "Player11 has the ball"
Player11 passes the ball to Player5
Player5 send message to mastermind - "I've got the ball"
Mastermind send messages to all players - "Player5 has the ball"

I hope you see it's much easier to handle.

Bye G.S.

Last edited by Gordon_Shumway; 03/10/07 21:16.

***Neue Webseite!! Mit vielen neuen Infos! http://www.2662-thegame.de.vu***
Re: [AI] : advice on FSM structure and transitions [Re: Gordon_Shumway] #116223
03/10/07 21:30
03/10/07 21:30
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline OP
User
demiGod  Offline OP
User

Joined: Mar 2006
Posts: 752
Portugal
Ok, i understand what you mean, that it seems to be easy to handle that information, thougth in that example of "who has the ball" i simple created an entity pointer TheControllingPlayer, which is updated with the Id skill of the entity which have less than a given distance to the ball, so TheControllingPlayer its updated every frame and i simple can support it - supportPlayer(my, TheControllingPlayer, speed, &targetPosition).

Well, thanks for your explanations i understand the concept now and if you dont mind if i fall in serious troubles i will ask you..thanks

Re: [AI] : advice on FSM structure and transitions [Re: demiGod] #116224
03/10/07 22:09
03/10/07 22:09
Joined: Feb 2004
Posts: 217
Wennigsen, Germany
Gordon_Shumway Offline
Member
Gordon_Shumway  Offline
Member

Joined: Feb 2004
Posts: 217
Wennigsen, Germany
If you've any problems, just ask or send me an PM.

One last question, what kind of sports game you're doing ?

Bye G.S.


***Neue Webseite!! Mit vielen neuen Infos! http://www.2662-thegame.de.vu***
Re: [AI] : advice on FSM structure and transitions [Re: Gordon_Shumway] #116225
03/10/07 22:22
03/10/07 22:22
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline OP
User
demiGod  Offline OP
User

Joined: Mar 2006
Posts: 752
Portugal
Thanks.
Its a soccer type game but with robots / droids, however the goal is to implement a reusable AI that can be used in other projects too. Its not been a trivial task at all.

Re: [AI] : advice on FSM structure and transitions [Re: demiGod] #116226
03/11/07 12:22
03/11/07 12:22
Joined: Jan 2003
Posts: 4,305
Damocles Offline
Expert
Damocles  Offline
Expert

Joined: Jan 2003
Posts: 4,305
To reuse the AI, you should have a very clean and well structured
approach. I think it is very demanding to abstract the AI
enought to make it multi-purpose usable. How about you start by using UML
as a Designtool to create a dependency diagram for it.
You dont have classes in 3dgs, but with some abtraction you can create
"classlike" structures.

You should also have a look into Lite-C, as this will become some kind of standart,
an is offers more structured elements for AI programming (like the structs for example)

Re: [AI] : advice on FSM structure and transitions [Re: Damocles] #116227
03/11/07 13:53
03/11/07 13:53
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline OP
User
demiGod  Offline OP
User

Joined: Mar 2006
Posts: 752
Portugal
Yeah, make it reusable like a sports "template AI" it seems to me very difficult too, probably i will try developing the system just for the project i mentioned.

Actually i use for some time flowcharts to handle the systems, so i divided it into modules like teamAI, playerAI, messaging system, steering behaviors, math calculations, animation, movement / gravity, etc., the problem is, like you said, there is no classes / objects, so handling and integrating those modules could be a pain..

C++ and SDK its not solution for me right now (learning curve too high) and even lite C and structurs dont know if it will make such a difference anyway..

I think i will continue this way, too bad there is no base examples on this matter, not the code but the abstract implementation.

Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1