![]() |
YaPB Developer Preview 1.1
YaPB (Yet another POD-Bot) Developer Preview 1.1
...here it is: Changes to the original POD-Bot 2.6 (in a fairly mess): Code:
+ FIXED: Bot can't plant the bomb in CS 1.4 or later Code:
+ Incorrect camping direction bug My homepage: http://yapb.yeah.net (There are also some other things out there, such as bot for Ricochet, bot for old HL/CS, fix for RealBot 1.0 which allows continue using RB v1.0 in Steam) Direct download: http://planet.time.net.my/Technology...yapbalpha1.exe Full source code is included. Of cource I owes a lot to Count Floyd and PMB ! I have also tested it with RealBot v1.0 and the latest RealBot WIP. Hope you like it. Enjoy, Wei 'Whistler' Mingzhi |
Re: YaPB Developer Preview 1.1
Good job Whistler! :)
In changing the A* pathfinder, have you put an heuristic function ? Because Count Floyd had none, that's why his bot was very "shy" when following an A* generated path. I wrote a square distance heuristic. Check that you've put one too :) But MOST IMPORTANT: you made it work with RealBot. How ? By not using FL_FAKECLIENT and using FL_THIRDPARTYBOT instead ? But TurtleRocker recommends us to put the FL_FAKECLIENT back anyway. So I'd like to know how you did it :) |
Re: YaPB Developer Preview 1.1
A* without heustic ? heh guys, that's called dijkstra then, rght ?
|
Re: YaPB Developer Preview 1.1
i dunno about dijkstra exactly. I thought that was by bi-directional searching? Or am i messing stuff up now?
A* always has an heuristic, if it does not have one, it would not create a path at all. So i guess a 'non heuristic' one is meant to be 'find the best node thats gets closer to goal'... |
Re: YaPB Developer Preview 1.1
Quote:
|
Re: YaPB Developer Preview 1.1
Quote:
Having no heuristic function (or a heuristic function that returns the same value for every node evaluated) will make the algorithm not directed at all, and so it will expand in all directions. A* can have no heuristic ; in this case the algorithm is exactly Dijkstra's (after simplification). Actually I'm starting to wonder if Count Floyd did really write all this A* function himself, because it's really well thought of. If he did, kudos! It's rather a generic-purpose A* template. You can pass as arguments to this function pointers to the addresses of the functions that you want it to use to compute the cost, to evaluate the heuristic, and to determine if the goal is reached or not. It's really polyvalent. But in his implementation, Count Floyd was always calling his A* function with a pointer to a heuristic function that was returning 0 for every node evaluated. Look at his prototype: Code:
PATHNODE *AStarSearch (PATHNODE *root, int (*gcalc) (PATHNODE *), int (*hcalc) (PATHNODE *), The heuristic function he was always passing as hcalc(), was this function: Code:
// No heurist (greedy) !! Code:
// Square Distance Heuristic |
Re: YaPB Developer Preview 1.1
I've made some minor fixes to yapb to make it compile and run at my linux server. You can download it at my homepage (as usual) ;)
|
Re: YaPB Developer Preview 1.1
I'm using the Floyd Table as the heuristic. I have also changed the cost function.
Code:
int gfunctionDamageDistCT(PATHNODE *p) @Terran: Thanks for the fix ! I'll take a look at it... Edit: cannot download your file Terran, just break up in half way :( |
Re: YaPB Developer Preview 1.1
Strange, I had no trouble downloading it...
I tried to upload the file here at the forum but I always get an database error... Please try this link to download the file, you should be able to use a download manager this way. |
Re: YaPB Developer Preview 1.1
Quote:
|
All times are GMT +2. The time now is 15:59. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.