.:: 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 ::. > YappA > Offtopic
Offtopic Just anything. You have time to waste ? Prove it !!!

Reply
 
Thread Tools
YaPB Developer Preview 1.1
Old
  (#1)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default YaPB Developer Preview 1.1 - 27-02-2004

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
 + FIXED: Invalid memory access in bots' hearing code
 + FIXED: Crash when shooting through obstacles
 + FIXED: Crash when the server has 32 players
 + FIXED: Crash in waypoint editor
 + FIXED: Some other random crashes
 + FIXED: Compatiable issue with CS Training Room
 + FIXED: Ignorance of shooting offset value in botskill.cfg
 + FIXED: Angle overflow issue
 + FIXED: Hitboxes issues
 + FIXED: Problems when bot's going through a door
 + FIXED: Selection "7" is not selectable in Weapon mode menu
 + FIXED: Bots having same score when they are re-added after kicked
 + FIXED: Incorrect usage of abs()
 + FIXED: Bots using dead hostages
 + FIXED: Incorrect kill experience collecting
 + FIXED: Recoil (punchangle) bug
 + Compatiable with current Steam/CS 1.6 (Thanks a lot for Pierre-Marie Baty for his source code and help on this !)
 + Bots will use the new weapons and the shield
 + Bots will buy weapons/shield/defuser correctly in CS 1.6
 + Added MetaMod support, you can use the DLL as both standalone bot and MetaMod plugin
 + Bots will pick up pistols on the ground
 + Changed player avoidance code, bots won't get stuck so easily
 + Changed A* pathfinder
 + Bots won't use A* pathfinder when collectexperience is off
 + Added a waypoint operating menu, command "waypoint menu", binded to "-" key by default
 + When error occures, the DLL will remove all bots and print an error message instead of crashing the server
 + Bots personality are now selectable in podbotmenu
 + Terrorists won't use the hostages any more
 + Bots will pick up defusers on the ground
 + Bots are now reasonable with the silencer
 + Much more careful connection/radius detecting in waypoint editor
 + Added "fillserver" command
 + Added "pathwaypoint connect/disconnect [Waypoint Nr.]" command to create/remove 2-way connections
 + Console commands can be used directly in the dedicated server console now, no more "pb addbot" (use "cmd addbot" for other bots when using this bot with other bots)
 + Added "botuseradio" command in podbot.cfg
 + Removed unnecessary "newmap" command, use "map" or "changelevel" instead, they won't crash (at least on my computer :) )
 + Improved bots' using sniper rifles and zoomable rifles
 + Source code is now restructured and cleaned up
 + Changed FakeClientCommand() stuff (Thanks to PMB again !)
 + Changed 'Need backup', bots won't always take the nearest waypoint to the caller
 + Added botman's chat humanizer code, bots will make some mistakes while chating
 + Rewrote the messy CS buy routines in a clean way
 + Ladder waypoints can be marked automatically now, just add a 'normal' waypoint
 + Path finding errors are no longer logged to poderror.txt, you have to use 'waypoint check' manually
 + Implemented VecToYaw, VecToAngles and MakeVectors directly in the bot code, no more engine calls
 + Simplified UTIL_GetTeam() code, no more strcpy/strcmp's
 + Some experience data is displayed in waypoint editor
 + Some other things I missed
 + Some bugs added (oops, I hope it's none) :)
Known bugs:
Code:
 + Incorrect camping direction bug
 + Very machine-like (not human-like) ladder climbing
 + Bots don't use grenades very well
 + Most of the known issues listed in the original PB 2.5 readme :)
Of course, it's currently only a PREVIEW release which is just a POD-Bot unoffical patch (that's why I left the POD-Bot welcome message as it used to be). But I'll continue working on it to make a much better bot as long as I have enough time.

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
  
Reply With Quote
Re: YaPB Developer Preview 1.1
Old
  (#2)
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: YaPB Developer Preview 1.1 - 27-02-2004

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



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: YaPB Developer Preview 1.1
Old
  (#3)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: YaPB Developer Preview 1.1 - 27-02-2004

A* without heustic ? heh guys, that's called dijkstra then, rght ?


  
Reply With Quote
Re: YaPB Developer Preview 1.1
Old
  (#4)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: YaPB Developer Preview 1.1 - 27-02-2004

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'...


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: YaPB Developer Preview 1.1
Old
  (#5)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: YaPB Developer Preview 1.1 - 27-02-2004

Quote:
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
yeah, i am quite anxious too... i'd like to fix this up so RB will work with all bots! It would be super cool to have a server with 4 types of bots fighting along/against each other (VS humans l33t).


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: YaPB Developer Preview 1.1
Old
  (#6)
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: YaPB Developer Preview 1.1 - 27-02-2004

Quote:
Originally Posted by stefanhendriks
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'...
No, Aspirin is right ; basically all searching algorithms can be bidirectional if you want, but it is right to say that A* is a directed Dijkstra. The direction influence is provided by the heuristic function.

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 *),
					   int (*goalNode) (PATHNODE *), PATHNODE * (*children) (PATHNODE *),
					   int (*nodeEqual) (PATHNODE *, PATHNODE *));
gcalc(), hcalc(), goalNode(), children() and nodeEqual() are pointers to functions. Really nice, isn't it ? Although from a strict performance point of view I'm not sure it's very computationally efficient.

The heuristic function he was always passing as hcalc(), was this function:
Code:
// No heurist (greedy) !!
int hfunctionNone (PATHNODE *p)
{
   if (p == NULL)
	  return (65355);
   return (0);
}
so I added mine:
Code:
// Square Distance Heuristic
int hfunctionSquareDist (PATHNODE *p)
{
   int deltaX = abs ((int) paths[g_iSearchGoalIndex]->origin.x - (int) paths[p->iIndex]->origin.x);
   int deltaY = abs ((int) paths[g_iSearchGoalIndex]->origin.y - (int) paths[p->iIndex]->origin.y);
   int deltaZ = abs ((int) paths[g_iSearchGoalIndex]->origin.z - (int) paths[p->iIndex]->origin.z);
   return (deltaX + deltaY + deltaZ);
}



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: YaPB Developer Preview 1.1
Old
  (#7)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: YaPB Developer Preview 1.1 - 27-02-2004

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)
  
Reply With Quote
Re: YaPB Developer Preview 1.1
Old
  (#8)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: YaPB Developer Preview 1.1 - 28-02-2004

I'm using the Floyd Table as the heuristic. I have also changed the cost function.
Code:
    int gfunctionDamageDistCT(PATHNODE *p)
    {
       if (p == NULL)
    	  return 65355;
    
       if (!p->parent)
    	  return 0;
    
       int iThisIndex = p->iIndex;
       int iCost = 0;
    
       int iDangerIndex = (pBotExperienceData + iThisIndex * g_iNumWaypoints + iThisIndex)->iTeam1_danger_index;
       if (iDangerIndex != -1)
    	  iCost += (pBotExperienceData + iThisIndex * g_iNumWaypoints + iDangerIndex)->uTeam1Damage;
    
       for (int i = 0; i < MAX_PATH_INDEX; i++)
       {
    	  int iNeighbour = paths[iThisIndex]->index[i];
    	  if (iNeighbour != -1)
    	  {
 		 iDangerIndex = (pBotExperienceData + iNeighbour * g_iNumWaypoints + iNeighbour)->iTeam1_danger_index;
    		 if (iDangerIndex != -1)
 		 iCost += (pBotExperienceData + iNeighbour * g_iNumWaypoints + iDangerIndex)->uTeam1Damage;
    	  }
       }
    
       iCost *= MAX_DAMAGE_VAL / (g_uMaxDamageCT + 1) / RANDOM_LONG(1, 8);
       iCost += GetPathDistance(p->parent->iIndex, iThisIndex);
    
       return iCost;
    }
    
    int hfunctionPathDist(PATHNODE *p)
    {
       if (p == NULL)
    	  return 65355;
       return GetPathDistance(p->iIndex, g_iSearchGoalIndex);
    }
About the RealBot thing: I'm not using any flags to flag the bot. I just use CBaseBot::Instance() function (similar botman's UTIL_GetBotPointer() )

@Terran: Thanks for the fix ! I'll take a look at it...

Edit: cannot download your file Terran, just break up in half way

Last edited by Whistler; 28-02-2004 at 05:05..
  
Reply With Quote
Re: YaPB Developer Preview 1.1
Old
  (#9)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: YaPB Developer Preview 1.1 - 29-02-2004

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.

Last edited by Terran; 29-02-2004 at 20:34..
  
Reply With Quote
Re: YaPB Developer Preview 1.1
Old
  (#10)
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: YaPB Developer Preview 1.1 - 29-02-2004

Quote:
Originally Posted by Whistler
iCost *= MAX_DAMAGE_VAL / (g_uMaxDamageCT + 1) / RANDOM_LONG (1, 8 );
iCost += GetPathDistance (p->parent->iIndex, iThisIndex);
I don't understand what you are doing here... ??? could you explain it a bit ?



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
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