MantisBT - Zandronum
View Issue Details
0003774Zandronum[All Projects] Bugpublic2020-03-25 04:522020-05-02 00:22
sosleepy 
 
normalminoralways
newopen 
LinuxUbuntu x86_64Eoan
3.0 
 
0003774: Bots are paralyzed in closed rooms
Bots are paralyzed in closed rooms such as the rocket launcher room in Doom II's MAP01 and BFG room in MAP07. Text below is the output of botdebug_botcommands when Chubbs is paralyzed in the rocket launcher room in MAP01, facing the wall, opposite direction of the "door".

[...]
bot Chubbs command: Roam
bot Chubbs command: GetCurrentWeapon
bot Chubbs command: StringsAreEqual
bot Chubbs command: GetClosestPlayerEnemy
bot Chubbs command: Roam
bot Chubbs command: LookForWeapons
bot Chubbs command: GetCurrentWeapon
bot Chubbs command: StringsAreEqual
bot Chubbs command: GetClosestPlayerEnemy
bot Chubbs command: Roam
bot Chubbs command: LookForPowerups
bot Chubbs command: GetCurrentWeapon
bot Chubbs command: StringsAreEqual
bot Chubbs command: GetClosestPlayerEnemy
bot Chubbs command: Roam
bot Chubbs command: GetHealth
bot Chubbs command: GetBaseHealth
bot Chubbs command: GetCurrentWeapon
bot Chubbs command: StringsAreEqual
bot Chubbs command: GetClosestPlayerEnemy
bot Chubbs command: Roam
bot Chubbs command: GetArmor
bot Chubbs command: GetBaseArmor
bot Chubbs command: LookForBaseArmor
bot Chubbs command: GetCurrentWeapon
bot Chubbs command: StringsAreEqual
bot Chubbs command: GetClosestPlayerEnemy
bot Chubbs command: Roam
bot Chubbs command: LookForSuperHealth
bot Chubbs command: GetCurrentWeapon
bot Chubbs command: StringsAreEqual
bot Chubbs command: GetClosestPlayerEnemy
bot Chubbs command: Roam
bot Chubbs command: LookForSuperArmor
bot Chubbs command: GetCurrentWeapon
bot Chubbs command: StringsAreEqual
bot Chubbs command: GetClosestPlayerEnemy
bot Chubbs command: Roam
bot Chubbs command: GetCurrentWeapon
bot Chubbs command: StringsAreEqual
bot Chubbs command: GetClosestPlayerEnemy
bot Chubbs command: Roam
bot Chubbs command: LookForWeapons
bot Chubbs command: GetCurrentWeapon
bot Chubbs command: StringsAreEqual
bot Chubbs command: GetClosestPlayerEnemy
bot Chubbs command: Roam
[...]
No tags attached.
? botwalk.wad (3,832) 2020-03-26 02:43
https://zandronum.com/tracker/file_download.php?file_id=2570&type=bug
jpg bot_stuck_map.jpg (111,927) 2020-04-30 18:58
https://zandronum.com/tracker/file_download.php?file_id=2584&type=bug
jpg

? botwalk-moving.wad (3,832) 2020-05-01 17:32
https://zandronum.com/tracker/file_download.php?file_id=2585&type=bug
? botwalk-large.wad (3,832) 2020-05-01 17:35
https://zandronum.com/tracker/file_download.php?file_id=2586&type=bug
Issue History
2020-03-25 04:52sosleepyNew Issue
2020-03-26 02:43sosleepyFile Added: botwalk.wad
2020-03-26 02:45sosleepyNote Added: 0021239
2020-03-27 00:30Vicious PariahNote Added: 0021243
2020-03-27 00:32Vicious PariahNote Edited: 0021243bug_revision_view_page.php?bugnote_id=21243#r13057
2020-03-27 00:33Vicious PariahNote Edited: 0021243bug_revision_view_page.php?bugnote_id=21243#r13058
2020-04-21 20:15sosleepyNote Added: 0021278
2020-04-30 18:58zeberNote Added: 0021294
2020-04-30 18:58zeberFile Added: bot_stuck_map.jpg
2020-04-30 19:00zeberNote Edited: 0021294bug_revision_view_page.php?bugnote_id=21294#r13069
2020-04-30 20:46sosleepyNote Added: 0021296
2020-04-30 20:59sosleepyNote Added: 0021297
2020-05-01 15:59Edward-sanNote Added: 0021298
2020-05-01 15:59Edward-sanStatusnew => feedback
2020-05-01 16:00Edward-sanNote Edited: 0021298bug_revision_view_page.php?bugnote_id=21298#r13071
2020-05-01 17:32sosleepyFile Added: botwalk-moving.wad
2020-05-01 17:35sosleepyFile Added: botwalk-large.wad
2020-05-01 17:48sosleepyNote Added: 0021299
2020-05-01 17:48sosleepyStatusfeedback => new
2020-05-01 18:05sosleepyNote Added: 0021300
2020-05-02 00:22sosleepyNote Added: 0021302

Notes
(0021239)
sosleepy   
2020-03-26 02:45   
Minimal map provided, if the run is any bigger, the bot will start roaming, the bot does not pickup any weapon placed within the room, maybe except if it is right in front of it. Run file with: zandronum -file botwalk.wad -iwad DOOM2.WAD -deathmatch -warp 01 +addbot chubbs +spectate
(0021243)
Vicious Pariah   
2020-03-27 00:30   
(edited on: 2020-03-27 00:33)
I have to be completely honest. The bot code is extremely old and I really don't think any major updates to Zandronum or Skulltag had addressed bot glitches. To be honest, bots were not expected to be very smart, heh.

I've been thinking about taking a gander at the bot code a bit more and attempting the task of making it a little bit "smarter". However, it's a large undertaking and I still have to study the codebase more.

(0021278)
sosleepy   
2020-04-21 20:15   
Since Roam() is executed, botcmd_Roam() and ASTAR_SelectRandomMapLocation() should be studied, since the problem seems to be that the bot doesn't select a new location to roam to, or that the location is selected but then it is necessary to study botcmd_Roam() more.
(0021294)
zeber   
2020-04-30 18:58   
(edited on: 2020-04-30 19:00)
We are using bots a lot for practice. I'm attaching a screen from SLADE: on the left is the "rocket launcher room in Doom II's MAP01" from one of the wads, where the bot is stuck. Once we change it to look like the one on the right - the bot works ok! We even thought that the angles between walls matter.

(0021296)
sosleepy   
2020-04-30 20:46   
Something is happening that the following condition in botcmd_Roam() is never satisfied:
if ( ReturnVal.ulFlags & PF_COMPLETE )
ReturnVal is set by ASTAR_Path()
(0021297)
sosleepy   
2020-04-30 20:59   
This condition is always satisfied and it appears to be the root of the problem:'https://bitbucket.org/Torr_Samaho/zandronum-stable/src/cfa30cac72570ba01d1fdc0bf07cb07125c5711b/src/botpath.cpp#lines-475 [^]'
BOTPATH_IsPositionBlocked() is worth checking.
(0021298)
Edward-san   
2020-05-01 15:59   
(edited on: 2020-05-01 16:00)
Quote
Minimal map provided, if the run is any bigger, the bot will start roaming


Can you share another demo map where the bot moves around instead?

Moreover, does this happen also in previous versions of Zandronum, or also in Skulltag?

(0021299)
sosleepy   
2020-05-01 17:48   
botwalk-moving has 8 units added to the east and 8 units added to the south, that is sufficient to make the bot move, I have also added botwalk-large. I have tested on skulltag 0.98d and the issue appears there.
(0021300)
sosleepy   
2020-05-01 18:05   
Except in skulltag 0.94c, but then the bot there keeps pushing against a wall.
(0021302)
sosleepy   
2020-05-02 00:22   
I don't know how helpful this is but changing the magic numbers of the conditions in ASTAR_SelectRandomMapLocation() does help a little. Apparently the bot is simply unable to select a random map location to go to.