Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
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
3 registered members (TedMar, AndrewAMD, fairtrader), 578 guests, and 0 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 3 1 2 3
Re: human AI (test) [Re: ello] #237517
11/20/08 13:43
11/20/08 13:43
Joined: Sep 2002
Posts: 1,604
Deutschland
ChrisB Offline
Serious User
ChrisB  Offline
Serious User

Joined: Sep 2002
Posts: 1,604
Deutschland
Hm, the simplest ai would be "always turn right (or left)". This has the advantage that you can be sure that you walked all possible ways. It works pretty good. Though you may find a better algorithm if you have some sort of knowledge where the exit could be (it can be only at an exterior wall for example)


www.Swollen-Eyeballs.org
ICQ:169213431
#3dgs@quakenet
Re: human AI (test) [Re: ChrisB] #237518
11/20/08 13:54
11/20/08 13:54

M
mercuryus OP
Unregistered
mercuryus OP
Unregistered
M



The trick with the "right and/or left" does not work with any type of area.
Think about areas in the center of the playground without a connected wall (like islands) or think about a completely wall-free field.
And the exit needn't be at an exterior wall - the AI should be able to handle ALL situations (at least a (temporary) non-exit-level).

Remember the player(or bot) can't see too far.
He only knows positions he already walked and their direction.

Re: human AI (test) [Re: ] #237519
11/20/08 14:02
11/20/08 14:02
Joined: May 2008
Posts: 301
Oxy Offline
Senior Member
Oxy  Offline
Senior Member

Joined: May 2008
Posts: 301
The simplest AI for this pathfinding is to never visit a square more than 2 times (marking the square).
Its a simple form of A*.

For this the human must just "drop a corn" on the floor, whenever he enters it.
If he sees more than 2 corns, he should not enter this area.
He should also favor areas without a corn over areas with one corn.

This way you will always find the exit.

Last edited by Oxy; 11/20/08 14:04.
Re: human AI (test) [Re: Oxy] #237521
11/20/08 14:25
11/20/08 14:25

M
mercuryus OP
Unregistered
mercuryus OP
Unregistered
M



The problem is - it's not a grid (and not a simple maze).
My little testlevels looks like, but they arn't.
It's a free area and the player/bot has an adjustable range of view.


Re: human AI (test) [Re: ] #237522
11/20/08 14:27
11/20/08 14:27
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
Quote:
If he sees more than 2 corns, he should not enter this area.


this wont work in a complex maze

Re: human AI (test) [Re: ello] #237523
11/20/08 14:35
11/20/08 14:35
Joined: May 2008
Posts: 301
Oxy Offline
Senior Member
Oxy  Offline
Senior Member

Joined: May 2008
Posts: 301
Prove me wrong..

Re: human AI (test) [Re: Oxy] #237525
11/20/08 14:44
11/20/08 14:44
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
My guess... he tried. wink

Last edited by PHeMoX; 11/20/08 14:45.

PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: human AI (test) [Re: Oxy] #237526
11/20/08 14:53
11/20/08 14:53
Joined: Sep 2005
Posts: 980
Aue, Sachsen, Germany
W
Wicht Offline
User
Wicht  Offline
User
W

Joined: Sep 2005
Posts: 980
Aue, Sachsen, Germany
Pathfinding is more complex than you just think. The bots must be able to find alternative ways depending on her characteristics, task/goal and the state of the game itself.

Example 1: BotA will walk to point x. But on the way from BotA's position to point x is a enemy. BotA knows "Fuck... i cant beat him. I have to choose a different way".

Example 2: Same like Example 1 but BotA know... "I'am rambo, a war machine. I kill everything. I will walk my way".

There are so many things that can affect the pathfinding.

- a patrol: A soldier has to control a gate. Can he leave his position under some circumstances?

- A enemy can not see the player. But he can hear something. Will he continue his way or will he make a circuitous way to observe what he heard? Is he a coward or not?

- A group of soldiers has to defend a position against you the player. One of the soldiers has no ammo. He has to walk to the side where a ammunition box is (maybe in a near room). Will some of the other soldiers give him covering fire?

- Same situation but... one soldier died. Will another soldier take the place of the dead soldier because it was a very important position?

Re: human AI (test) [Re: Oxy] #237530
11/20/08 15:09
11/20/08 15:09
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
Originally Posted By: Oxy
Prove me wrong..


imagine for example a way with 10 diversions, now if you dont just dumbly go into one after the other but crisscross it, you will of course walk the same place more than twice...

or even think of that way 1 opens gate 3 and there is the switch for gate 10.. theres switch for gate 2 and so on...

Re: human AI (test) [Re: ello] #237534
11/20/08 15:25
11/20/08 15:25
Joined: May 2008
Posts: 301
Oxy Offline
Senior Member
Oxy  Offline
Senior Member

Joined: May 2008
Posts: 301
Ok, then lets alter this (enabling to take 2 corn areas), and say that you will always drop one corn, and always favor the way with the least corns.
And if all surrounding have the same "corncount", choose a random one. (or with some direction preference if liked)
This way you will find the exit at one point.

The thing with the switches is not a typical maze anymore.
Im referring to pure "navigation" mazes, with the ability to pass
a way into two directions.
-> such as the classic English garden mazes.

Last edited by Oxy; 11/20/08 15:31.
Page 2 of 3 1 2 3

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