|
|
Re: human AI (test)
[Re: ChrisB]
#237518
11/20/08 13:54
11/20/08 13:54
|
mercuryus
OP
Unregistered
|
mercuryus
OP
Unregistered
|
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
Senior Member
|
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
|
mercuryus
OP
Unregistered
|
mercuryus
OP
Unregistered
|
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
Senior Expert
|
Senior Expert
Joined: Oct 2002
Posts: 8,939
planet.earth
|
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
Senior Member
|
Senior Member
Joined: May 2008
Posts: 301
|
|
|
|
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
Senior Expert
|
Senior Expert
Joined: Oct 2002
Posts: 8,939
planet.earth
|
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
Senior Member
|
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.
|
|
|
|