.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Re: Simple Pathfinding Idea
Old
  (#11)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Simple Pathfinding Idea - 06-12-2004

i'd say, try to let it find a path first (shortest) before trying to create random paths


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: Simple Pathfinding Idea
Old
  (#12)
Rifleman
This user broke our rules and has been BANNED
 
Status: Offline
Posts: 128
Join Date: Sep 2004
Location: Mars
Default Re: Simple Pathfinding Idea - 06-12-2004

I can get them to find a shortest path but not a random path
  
Reply With Quote
Re: Simple Pathfinding Idea
Old
  (#13)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Simple Pathfinding Idea - 06-12-2004

well, then simply change the cost. So normally you have:

cost=distance

you add lines so yo uhave

cost += cost * (any value between 0 and 1).

Ie, when danger is 1, its very dangerious and will double the cost for that node...


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: Simple Pathfinding Idea
Old
  (#14)
Rifleman
This user broke our rules and has been BANNED
 
Status: Offline
Posts: 128
Join Date: Sep 2004
Location: Mars
Default Re: Simple Pathfinding Idea - 06-12-2004

is there any way to make the floyd-warshall pathdiner take a more random route ? I am currently playing around with various pathfinder
  
Reply With Quote
Re: Simple Pathfinding Idea
Old
  (#15)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Simple Pathfinding Idea - 06-12-2004

basically, no. That's because the Floyd-Warshall algorithm only consists in looking up in a table of fixed paths (which table is usually saved in the waypoints file).

If you want to know more about pathfinders, as well as pseudo-code samples for various of them, look here:
http://filebase.bots-united.com/inde...on=file&id=106
that's all I ever needed to write my own A* implementation.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Simple Pathfinding Idea
Old
  (#16)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: Simple Pathfinding Idea - 06-12-2004

well, somewhat you can do it.

once again a quote from http://www.lampel.net/johannes/joebo...XPDoc-beta.pdf, i'm too lazy to type that again :

Quote:
To find a path between two nodes of the waypoint graph, there are several algorithms. Using brute force here is not possible unless you only have less than 200 nodes with only little interconnectivity. \textit{\joebot used the Floyd Warshall algorithm. It calculates a table containing all shortest paths from each waypoint to another before the game starts. When the bot needs then a path, it can be calculated really fast : You only need to look up the next waypoint for your current nearest waypoint and your goal. So if you get off your initially wanted path, continueing to your target does not need additional calculating. If you have only a few targets like in Counterstrike, you need to randomize your paths : You can do this for example by picking up to 50 nodes from the middle of the wanted path, calculating some values for those new paths, like how dangerous a path is, how long the path is at all, if the hostages are able to follow and some random values. The bot then decides which path to take based on its constitution - the bot can be aggressive, normal or defensive. By searching paths this way, they can be randomized almost sufficiently, but defining the exact costs of the paths is problematic.
and btw, like william pointed out, that generation5 A* code, which is containing this updateParents function is pretty slow. removing this updateParent function and reinserting the relevant nodes to the open list is better and faster



Last edited by @$3.1415rin; 06-12-2004 at 20:24..
  
Reply With Quote
Re: Simple Pathfinding Idea
Old
  (#17)
RedLink
Member
 
Status: Offline
Posts: 5
Join Date: Jan 2004
Default Re: Simple Pathfinding Idea - 15-12-2004

ahh, I did something similar to this for my bot "AXB" ;P but then again, I didnt find a good way to do it fast enougt, It would just keep eating CPU power ;P
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com