.:: 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 ::. > Cyborg Factory > Grave Bot
Grave Bot Artificially deadly intelligence for S&I by Ghoul Science & IndustryHLDM

Reply
 
Thread Tools
Re: Waypointing
Old
  (#61)
Ghoul
Moderator
 
Status: Offline
Posts: 56
Join Date: Jul 2004
Location: Michigan
Default Re: Waypointing - 22-01-2005

Hey everyone, check these out.

Grave Bot in S&I stability test 1 (insanely high scores)

Grave Bot in S&I stability test 2 (notice the time in the console window for each bot)

I'm going to write the avoiding code today and hopefully that'll be the end to that problem.

Last edited by Ghoul; 22-01-2005 at 17:01..
  
Reply With Quote
Re: Waypointing
Old
  (#62)
Ghoul
Moderator
 
Status: Offline
Posts: 56
Join Date: Jul 2004
Location: Michigan
Default Re: Waypointing - 22-01-2005

Okay, found and fixed the problem. Let me explain...

The contact evasion code used some math to determine the current direction the bot was headed. One function used was the asin function, which takes one parameter. This parameter is a float between -1 and 1. The bot inputs its current strafe speed divided by the max speed to get the value which asin takes. This all works fine normally under the correct conditions.

S&I however changes the maximum speed of players quite often. Something like switching weapons will increase or decrease the max speed. If a bot is currently on a weapon with high max speed, then switches to a weapon of low max speed, there is a fraction of a second where the bot is actually traveling faster than the max speed.

So, in the code, the obtained value will be either > 1 or < -1 (depending on the direction of travel) and that value will be passed on to asin. asin doesn't work correctly with values out of its range, and so it returns an invalid jumbled float. This value is passed on into the function (BotAvoidContact), corrupting the angular vector caluclated, and the direction vector calculated. The bad direction vector is used in an initial TraceLine function to see if anything is in the way of the bot.

The TraceLine function is where the looping begins. Apparently it is unable to correctly handle the corrupt vector, and somehow hits an infinite loop. Since the function is within the engine, there's no way to really know.

The first fix I tried was to limit the value of the variable passed into the asin function. This worked fine, as it should, but then I realized that the whole asin function itself, along with many other calculations, were pointless. I simply created a new vector in the bot called v_curr_direction. Everytime the bot calculates the direction it wishes to travel, that vector is updated with the calculated direction.

The avoid function has been updated to use this new vector, rather than performing tons of unneeded math, and all is well.

What's going to happen today? A release of 0.3 with the S&I crash fixed and hopefully the min_bot and max_bot crash fixed (along with a couple other misc adjustments). Version 0.3 will be released under the following:

- Windows standard hooking DLL
- Windows metamod DLL
- Linux standard hooking .so
- Linux metamod .so

See ya guys!

Last edited by Ghoul; 23-01-2005 at 07:44..
  
Reply With Quote
Re: Waypointing
Old
  (#63)
Ghoul
Moderator
 
Status: Offline
Posts: 56
Join Date: Jul 2004
Location: Michigan
Default Re: Waypointing - 23-01-2005

Beta 0.3 is out. Check out the news.
  
Reply With Quote
Re: Waypointing
Old
  (#64)
CoCoNUT
Member
 
CoCoNUT's Avatar
 
Status: Offline
Posts: 120
Join Date: Jan 2004
Location: Germany/Lower Saxony/
Default Re: Waypointing - 24-01-2005

Hi, beta 0.3 is really cool, bots donīt crash anymore, great fun! I completed all si_-standard-map-waypoints. Some more difficult paths (crouch-jump etc.) are not waypointed yet. Removed some paths with breakables (mill&depot) and removed the sniper-waypoints from si_urban. Made a few fixes and updates, also all remaining maps. Enjoy! ...and report all bugs .

These waypoints are "all free", anyone is allowed to tweak and re-release them.

Maps: all S&I standard-maps (except si_overtime)
Only flags: team, weapon, health, armor, door, crouch, ladder, jump

----edit:----
What I saw in si_early: No matter how I place the waypoints, the bots try to reach the administrator directly and get stuck on the ramp:
Attached Thumbnails
Click image for larger version

Name:	early.jpg
Views:	1144
Size:	21.1 KB
ID:	592  
Attached Files
File Type: zip si-grave-coco.zip (59.8 KB, 1185 views)


For maps, nav-files, waypoints and more visit: http://coconut.de.tc

Last edited by CoCoNUT; 24-01-2005 at 18:40..
  
Reply With Quote
Re: Waypointing
Old
  (#65)
Ghoul
Moderator
 
Status: Offline
Posts: 56
Join Date: Jul 2004
Location: Michigan
Default Re: Waypointing - 24-01-2005

If I remember right, the bots try to head directly to their goal if they're close enough. That ramp must but just tall enough so they thing they can walk right to him. I'll put in visibility and traceline checks for 0.4.
  
Reply With Quote
Re: Waypointing
Old
  (#66)
BuMHeD
Member
 
Status: Offline
Posts: 22
Join Date: Nov 2004
Default Re: Waypointing - 25-01-2005

Quote:
Originally Posted by Ghoul
Beta 0.3 is out. Check out the news.
Great news Ghoul!! I will download and test this new and improved Grave Bot just as soon as I can and let you know if we have any crash issues!! Pray tell, what exactly did you change in hopes of dodging the min/max_bot crash bug. I'm a student of C++ and I'm curious what you may have editted to prevent the overflow. Thanks.

*~BuM~*
  
Reply With Quote
Re: Waypointing
Old
  (#67)
Ghoul
Moderator
 
Status: Offline
Posts: 56
Join Date: Jul 2004
Location: Michigan
Default Re: Waypointing - 25-01-2005

I extended the time between bots joining. Maybe that'll work, maybe not. I didn't really test. I'll probably just completely redo the min/max code for 0.4.

So, with that said. Give me suggestions on how it should work exactly.
  
Reply With Quote
Reply


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

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