.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   The RealBot 'Source' (http://forums.bots-united.com/forumdisplay.php?f=52)
-   -   Bugs to be fixed (http://forums.bots-united.com/showthread.php?t=1854)

stefanhendriks 03-06-2004 16:35

Bugs to be fixed
 
So far i have heard/seen:

- fix the bug where at some occassions the frame-rates drop drasticly
- fix camp 'at spawn point'

also:
- either fix the nodes system and make it more 'work' , or just implement navmesh. Perhaps a good idea to investigate navmesh (experiment with it) and when it works on a test-bot (or even better, it works with RB but on a test/experimental code of WIP's) then use that.

any more bugs can be reported here, so it would create a sort of 'todo' list.

MusicMan 03-06-2004 17:45

Re: Bugs to be fixed
 
I dont know why this happens, but on all the realbot releases I have tried, the game always makes a little lag chop and then runs normal, and then makes a lag chop again and so on. This has happend on all the versions I have tried even the ones before AI v1.0 and the WIPs. It even does it without any bots ingame. It even happens in the latest unofficial WIP #10:( I dont know if this is due to realbot being very CPU demanding, or if its just not freeing as much memory as it could be doing. Do any other people get this problem?

It's very annoying as I really like the bot, but not the choppyness that it creates:)

Just pointing out the problems I have experienced, as it should help Stefan or the Team Members make the bot even better than it already is ;)

Cheers:)

stefanhendriks 03-06-2004 18:13

Re: Bugs to be fixed
 
i THINK it could be due its writing the data everytime on new round... so perhaps i should make a console command to toggle this off (but this will disable 'learning'!)

MusicMan 03-06-2004 18:42

Re: Bugs to be fixed
 
Yeah, you could try that and send me a test dll, and I will tell you if it still happens on my comp:)

Thanks in advance;)

BTW I haven't had this problem with any other bots, just to get things clear:)

davek 05-06-2004 02:08

Re: Bugs to be fixed
 
i havent had much problem with lag spikes in the previous few wips, but 10 has it quite bad. i have been trying to figure out why, but to no avail. i havent looked at the code because i was having trouble with CVS on my comp so i uninstalled it. maybe i should install a different client. altho i dont know if i really have time to work on it... probably shouldnt add another thing i want to do that takes away from what i actually need to do.

stefanhendriks 05-06-2004 17:19

Re: Bugs to be fixed
 
@DaveK, did you try Tortoise CVS? I use that and it works like a charm.

davek 05-06-2004 18:44

Re: Bugs to be fixed
 
Quote:

Originally Posted by stefanhendriks
@DaveK, did you try Tortoise CVS? I use that and it works like a charm.

thanks. i will give it a try.

Khoralt 05-06-2004 23:55

Re: Bugs to be fixed
 
Quote:

Originally Posted by stefanhendriks
@DaveK, did you try Tortoise CVS? I use that and it works like a charm.

I downloaded and try Tortoise just yesterday but it didn't seem to work out quite right. When I'd right-click on a folder, I'd just get the submenu options, none of the primary right-click options that Totoise was supposed to add. I'm going to give it another chance on Monday. Hopefully it'll work out better.

evy 08-06-2004 09:03

Re: Bugs to be fixed
 
In dll.cpp, there is a race condition. The bot.cfg is not executed when a new map is loaded within 5 seconds of the dedicated server start.

The bot_cfg_pause_time variable is reset to zero in Spawn() funtion and this is not needed (it works fine without it) and is bad (it works better without).

So, dll.cpp should be like
Code:


Spawn (edict_t * pent)
{
  if (gpGlobals->deathmatch)
        {
          char *pClassname = (char *) STRING (pent->v.classname);
          if (strcmp (pClassname, "worldspawn") == 0)
                  {
                                  // do level initialization stuff here...
                                  draw_nodes = false;
                                  draw_nodepath = -1;
                                  draw_connodes = false;
                                  // FIX: Internet mode timing
                                  internet_addbot = false;          // Add a bot?
                                  add_timer = gpGlobals->time;  // Timer for adding bots
                                  m_spriteTexture = PRECACHE_MODEL ("sprites/lgtning.spr");
                                  // sound
                                  PRECACHE_SOUND("misc/imgood12.wav");
                                  g_GameRules = TRUE;
//                                bot_cfg_pause_time = 0.0;  evy: No need to reset it to zero... else it causes a race condition when new map are loaded just when server starts
                                  respawn_time = 0.0;
                                  spawn_time_reset = FALSE;
                                  prev_num_bots = num_bots;
                                  num_bots = 0;

Hope it helps

-eric

stefanhendriks 11-06-2004 16:14

Re: Bugs to be fixed
 
yes, i applied this too. thank you! :)

Josh_Borke 07-07-2004 05:05

Re: Bugs to be fixed
 
is anyone working on getting navmeshes working with RB?
i got it to make the navmesh so far, i'll work on getting it to print out tmrrw

-- edit --
i have it so that it generates the mesh file and can print it out for debugging purposes. will work more later. if anyone wants to help, let me know

all credit goes to PMB. you rock:D

stefanhendriks 07-07-2004 11:42

Re: Bugs to be fixed
 
I also heard evy made something , but it is not finished yet. It seems to generate node's out of the world, instead of nav meshes. :)

evy 07-07-2004 14:56

Re: Bugs to be fixed
 
Quote:

Originally Posted by stefanhendriks
I also heard evy made something , but it is not finished yet. It seems to generate node's out of the world, instead of nav meshes. :)

Indeed, I mostly finished this kind of mixed approach. Read a BSP file, find walkable surfaces, waypoint them + add spawnpoints nodes + handle the ladder. Based on Botman & PMB code. 8)

If you want I can commit them in a Bsp2Rbn subdirectory in the CVS repository.

Works fine with de_aztec, cs_siege and mostly with mindmaze2 =)

-eric

MusicMan 07-07-2004 15:08

Re: Bugs to be fixed
 
please do so :)

stefanhendriks 07-07-2004 19:08

Re: Bugs to be fixed
 
evy you can submit this ofcourse as a sub-project (in a sub-dir). No problems with that ;)

evy 08-07-2004 00:36

Re: Bugs to be fixed
 
Quote:

Originally Posted by stefanhendriks
evy you can submit this ofcourse as a sub-project (in a sub-dir). No problems with that ;)

Committed in CVS under directory Bsp2Rbn.

Comments are welcome :D don't be too harsh ???:(

It seems to work on Linux (do not have a Windows compiler) and for maps like de_aztec, cs_siege, ...

Comments are welcome but I'll be out of email (vacations!!!) until 16/17 of July.

-eric

Josh_Borke 08-07-2004 03:48

Re: Bugs to be fixed
 
nvm :)

--edit--
er
Code:

  cvs -d etc checkout realbot
  cd realbot/Bsp2Rbn
  make
  make: *** No rule to make target `Bsp2Rbn.o', needed by `Bsp2Rbn'.  Stop.

removed the Bsp2Rbn.o requirement and now it cannot find paklib.h
also cannot find studio_model.h

evy 08-07-2004 10:25

Re: Bugs to be fixed
 
Oups... Sorry.

The two missing files have just been added as well as Bsp2Rbn.cpp which was also missing (which was the issue with Makefile).
:'(

-eric

Josh_Borke 08-07-2004 15:09

Re: Bugs to be fixed
 
er, thx for the fix :) but now I get
Code:

util.cpp: In function `void UTIL_BuildFileNameRB(char *, char *)':
 util.cpp:543: implicit declaration of function `int basename(...)'
 util.cpp:543: assignment to `char *' from `int' lacks a cast

:) HTH
nice work btw :)

evy 08-07-2004 15:18

Re: Bugs to be fixed
 
Quote:

Originally Posted by Josh_Borke
er, thx for the fix :) but now I get
Code:

util.cpp: In function `void UTIL_BuildFileNameRB(char *, char *)':
util.cpp:543: implicit declaration of function `int basename(...)'
util.cpp:543: assignment to `char *' from `int' lacks a cast


Ooups again, looks like Windows & Linux compiler have different sensitivity level 8o
Fixed in CVS, there was a missing
Code:

#include <libgen.h>
-eric

Josh_Borke 08-07-2004 15:23

Re: Bugs to be fixed
 
woot, thanks :)
compiles just fine now :)

Code:

printf("usage: %0 bspfile [ minx maxx miny maxy]\n",argv[0]);
should be
Code:

printf("usage: %s bspfile minx maxx miny maxy\n",argv[0]);
since you require minx/maxx/miny/maxy to be defined, prevents confusion over the requirement.
and %0 should be %s :)
HTH
nice work :)

evy 08-07-2004 15:38

Re: Bugs to be fixed
 
Josh,

Quote:

Originally Posted by Josh_Borke

since you require minx/maxx/miny/maxy to be defined, prevents confusion over the requirement.
and %0 should be %s :)

Thanks for your time and spotting the %0 (shame on me! :'( )...

The minx...maxy are option and only needed when you want to generate nodes on part of the BSP map.


-eric

Josh_Borke 08-07-2004 15:46

Re: Bugs to be fixed
 
Code:

[09:45:39][<bob>@<jane>:Bsp2Rbn]$ ./Bsp2Rbn /home/<removed>/csds/cstrike/maps/cs_estate.bsp >> out.tmp
  Segmentation fault

eep!
it output all the files, so i think it's just an unclean exit

Josh_Borke 26-07-2004 00:55

Re: Bugs to be fixed
 
--last edit, i swear--
util.cpp line 653
Code:

weapon_id == CS_WEAPON_UMP45 ||
is there a reason a UMP45 is listed as a secondary weapon? seems to me to be a primary...
btw, pistol mode is trivial to include, here are the changes:
(+ = new code, - = removed code, everything else is already there)

game.h: line 118
Code:

  bool bEngineDebug;  // Print engine debug messages
 +  bool bPistols;

game.cpp: line 99
Code:

    bEngineDebug = false;                // ... prints engine debug messages (for figuring out engine interceptions)
  +  bPistols = false;        // pistols only mode

bot.cpp: line 177
Code:

-  buy_primary = true;
 -  buy_secondary = false;
 +  buy_primary = (Game.bPistols ? false : true);
 +  buy_secondary = (Game.bPistols ? true : false);

line 101
Code:

-  if (RANDOM_LONG (0, 100) < 15)
 +  if (RANDOM_LONG (0, 100) < 15 || Game.bPistols)

line 338
Code:

-  buy_primary = true;
 +  buy_primary = (Game.bPistols ? false : true);
    buy_grenade = false;
    buy_flashbang = 0;
 -  buy_secondary = false;
 +  buy_secondary = (Game.bPistols ? true : false);
    buy_armor = false;

and of course teh requisite command in dll.cpp, but i'll let you decide what it should be.
I think that is all the changes, if you'd like me to, I can send you all the files I've changed.
the only problem i've found so far is that the T's buy ump45's but I think that is because the UTIL_giveweapontype returns SECONDARY for those.

should shields be classified as primary weapon?
currently if a bot is carrying a shield, the shield is not put into pBot->iPrimaryWeapon, should it be?

As always, HTH :)

Josh_Borke 27-07-2004 04:00

Re: Bugs to be fixed
 
Quote:

Originally Posted by stefanhendriks
So far i have heard/seen:

- fix the bug where at some occassions the frame-rates drop drasticly
- fix camp 'at spawn point'

also:
- either fix the nodes system and make it more 'work' , or just implement navmesh. Perhaps a good idea to investigate navmesh (experiment with it) and when it works on a test-bot (or even better, it works with RB but on a test/experimental code of WIP's) then use that.

any more bugs can be reported here, so it would create a sort of 'todo' list.

would modifying the node system so that connections are only created when going to a node. ie, the neighbors are only added when you actually come from that neighbor. then recording how you got there.
that would correct problems of bots trying to go from under the bridge in de_aztec to the other ends of the bridge by creating one way connections.
(not my idea, gleaned from RACC template #2 by PMB, go PMB, give us RACC! or atleast navmesh-tutorial part 2 :))

V or 'Tex 27-07-2004 21:25

Re: Bugs to be fixed
 
Wouldn't it be best to just check if a player is in the air... if possible...


And then if they are in the air when a node is created, make the connection between the created node and the previous node one way. That way you fix all the jumping issues and you leave all the other paths bidirectional.


There should be specification of spawn-nodes at the beginning of every round. How about adding a bit to each node's data, and have that bit be a 'is-spawn' check. If a bot spawns and he is at a node, or a node is created, then the node at the spawn becomes a spawn node.

evy 27-07-2004 21:29

Re: Bugs to be fixed
 
Quote:

Originally Posted by V or 'Tex
Wouldn't it be best to just check if a player is in the air... if possible...

AFAIK, this is already done in the code but it needs further investigation...

Quote:

Originally Posted by V or 'Tex
There should be specification of spawn-nodes at the beginning of every round. How about adding a bit to each node's data, and have that bit be a 'is-spawn' check. If a bot spawns and he is at a node, or a node is created, then the node at the spawn becomes a spawn node.

The spawn points of T & CT are already automagically added as goals and as nodes (the current issue is that those nodes are in the air and not in the ground -- I'll try to fix it).

-eric

stefanhendriks 27-07-2004 21:32

Re: Bugs to be fixed
 
checking in the air is not enough. A node that is 'in the air' but which is not damaging (due falling) is marked as a 'good' one. Ie, you can walk of the bridge of aztec without being hurt right!?

Somewhere there is a check going wrong on the 'opposite' direction. When reading through the code i even confuse myself. argh.

Josh_Borke 08-08-2004 04:12

Re: Bugs to be fixed
 
ok, so I continued to go along with converting realbot to use navmesh.
basically I took PmB's RACC template and merged it with realbot's source.
my progress thus far:
1) Generates a navmesh for the current map
2) saves it for later use
3) determines goals for the map
4) loads specific knowledge for navigation for each bot
5) can walk around based on knowledge
6) walks around based on the knowledge, and NOT on node machine knowledge.

i haven't tested the combat in it yet, as I'm sure it's awful.
also, I have a problem where it can't find some spawn points, and therefore some bots don't go.

if anyone wants the source, just let me know.

-josh

stefanhendriks 08-08-2004 08:03

Re: Bugs to be fixed
 
i'm always interested , so you can mail it to me if you like ;)

[BBB]sluggo 02-09-2004 04:49

Re: Bugs to be fixed
 
I'll add to the list.
A bug or what i should call it... strange bot behavior maybe?
When a bot dicides to thow a grenade (HE) he has seen the enemy but the enemy has gotten out of sight.. or something like that, shouldn't he throw the grenade as soon as possible at the last known location? As it is now he waits until he sees the enemy again.. but with the grenade in his hand he will most certainly die.

dstruct2k 02-09-2004 07:28

Re: Bugs to be fixed
 
sluggo, that's not how nades work in CS... Stop playing HL before you judge. ;)

Oh, and yes, we'll do that. :D

Ry Spy 04-09-2004 12:09

Re: Bugs to be fixed
 
Quote:

Originally Posted by dstruct2k
sluggo, that's not how nades work in CS... Stop playing HL before you judge. ;)

Oh, and yes, we'll do that. :D

Here in my country, when we play cstrike, we usually throw grenades at them even if we can't see them. (It's like being lucky if you kill the enemy at once :) )


All times are GMT +2. The time now is 04:53.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.