![]() |
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:
|
Re: YaPB Developer Preview 1.1
1 Attachment(s)
I've made a patchfile with my changes.
Note: I used dos2unix to remove the (at linux) unneccessary carridge-return chars of the files, therefore the patch might not apply at your system. But the changes are minimal at all... |
Re: YaPB Developer Preview 1.1
One wish for the next release:
please change the commands from "addbot" to something like "yapb addbot" as most of the other bots do. Otherwise it could be difficult to mix it with other bots at the same server... |
Re: YaPB Developer Preview 1.1
Quote:
|
Re: YaPB Developer Preview 1.1
This patch contains the changes I had to made at Whistlers yapb sources to make it compile at my linux system...
|
Re: YaPB Developer Preview 1.1
That pathfinder is based on distance, and take the damage value in account.
@Terran: Thanks a lot ! |
Re: YaPB Developer Preview 1.1
This bot is very nice! I got naded more than once by this bastards ;)
How about adding them to BU ? |
Re: YaPB Developer Preview 1.1
Whenever Whistler requests it... :)
|
Re: YaPB Developer Preview 1.1
okay I've just uploaded a new version (as well as some other new things) :)
Check them out if you wish... |
Re: YaPB Developer Preview 1.1
I will check it out once my headache is over... :(
|
Re: YaPB Developer Preview 1.1
2 Attachment(s)
Today I finally was able to start looking at it :|.
I had to make some minor changes to compile the bot at my debian 3.0 testing/glibc2.3 system, I've attached the changes and the compiled bot. |
Re: YaPB Developer Preview 1.1
I'm getting lots of "SZ_GetSpace: overflow on SVC_RuleInfo" lines...
|
Re: YaPB Developer Preview 1.1
me 2, but only after i got cz and started using metamodX
is this on a cz or cs server? |
Re: YaPB Developer Preview 1.1
Hmmm.... try putting that FL_FAKECLIENT in the CBaseBot constructor and it should be okay (Don't know whether this putting will crash CZero - I still haven't bought it)
I just wanted it can be used with RealBot so I didn't put it PS, I don't think any 3rdparty bots can be used with CZero since when CZero bots are get added the ClientConnect and ClientPutInServer in the bot DLL won't get called and this will causes problems. |
Re: YaPB Developer Preview 1.1
About the SZ problem:
This problem could be caused by AMXX to, some users have reported this problem with the current version. I'll check this out and test yapb without any other plugins. BTW: A few days ago I switched from AMX to AMXX and also replaced MetaMod with MetaModX. See http://www.amxmodx.org |
Re: YaPB Developer Preview 1.1
Terran, I wonder why you're doing this...
Code:
+#ifdef _WIN32 Code:
#ifdef _WIN32 Code:
m_iChosenGoalIndex = iSourceIndex; |
Re: YaPB Developer Preview 1.1
I've been lazy and simply copied the working code from my modified 1.1 version:D.
You didn't include the bot.h in the linkgame.cpp therefore this define wasn't there! I included the bot.h AFTER i changed those lines because of some other errors I got. I've undone the changes (but kept the bot.h include) and this works too - as expected ;). Quote:
|
Re: YaPB Developer Preview 1.1
Bug report (yapb 1.2):
I set my server to Code:
yapb_maxbots 2 Now I cannot remove those bots! Well, I can remove them but they keep coming back, no matter what I tried (yapb removebots, kicked manually...). For a few seconds it seams as if the bots are gone but then they reappear. |
Re: YaPB Developer Preview 1.1
Another "bug":
While running awp_map I set mp_freezetime to 0 (to minimize spawn killing). But the bots still freeze for some seconds at each round start... |
Re: YaPB Developer Preview 1.1
Quote:
Code:
static float flCvarUpdateTime = 0.0; They are waiting for buying weapons |
Re: YaPB Developer Preview 1.1
About the SZ_Getspace error messages see the documentation of the NoSeeVar MetaMod plugin...
Whistler, you exporting all CVars which is causing this error message. IMHO there is no need to export them, nobody cares for those values except for the admin... About the freezing: This makes them helpless prey at e.g. awp_map... |
Re: YaPB Developer Preview 1.1
I've blocked those CVars from the server rules:
yapb_autosaveexp yapb_botchat yapb_botspray yapb_botuseradio yapb_debuggoal yapb_detailnames yapb_followuser yapb_inhumanturns yapb_maxbots yapb_maxskill yapb_minskill yapb_shootthruwalls yapb_timergrenade yapb_timerpickup yapb_timersound yapb_useexp yapb_votekick |
Re: YaPB Developer Preview 1.1
blocking those CVARs may cause weird problems.
you can try modify the source code to the old dev1.1 version (use pfnAddServerCommand). Also you can try using the DLL as normal HPBbot type DLL (i.e., use +localinfo mm_gamedll) and it may be better |
Re: YaPB Developer Preview 1.1
I'm not blocking the engines access to the CVARs, I prevent the remote access to them via the server status request of the game browsers.
When you define a CVAR you can set some flags. One of those flags makes the CVAR appear in the server status report (that's what causes the problem). All this plugin does is defining those CVAR before other plugins do (CVARS can only be defined once 8)) - but without the "export" flag (I don't know the correct name). |
Re: YaPB Developer Preview 1.1
The possible flags a CVAR can wear are those here:
Code:
#define FCVAR_ARCHIVE (1<<0) // set to cause it to be saved to vars.rc I'd like to make sure I do things right. |
Re: YaPB Developer Preview 1.1
The problem is caused by the FCVAR_SERVER flag. Remove it from your flags and the SZ_Getspace error should be history.
|
Re: YaPB Developer Preview 1.1
ah great. I never used it anyway :)
|
Re: YaPB Developer Preview 1.1
Oh sorry but I've never been an admin, thanks for pointing this out anyway, I've fixed it now.
|
All times are GMT +2. The time now is 04:55. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.