Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Brains AI - Not Really a Bug ((more a suggestion for improvement))
New Topic New Poll Post Reply
Poster Message
Mouse
Level: Master Delver
Avatar
Rank Points: 246
Registered: 04-21-2005
IP: Logged
icon Brains AI - Not Really a Bug (+1)  
I've noticed that when you have a lot of brains in a room DROD really slows down. So I had a thought about how to speed it up a bit.

Pseudo code:
set Brained to False;
For each brain:
- if Brained is true do nothing;
- else set Brained to True if this Brain can smell Beethro;
End of for each.


[Last edited by Mouse at 01-20-2006 02:24 AM]
01-20-2006 at 02:19 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Syntax
Level: Smitemaster
Rank Points: 1218
Registered: 05-12-2005
IP: Logged
icon Re: Brains AI - Not Really a Bug (0)  
But each brain is omni-room-ciant.
Maybe a better way way to speed it up would be that only the last brain placed actually does anything.

If it dies, the next placed alive brain takes over...

That is assuming (and it's a huge assumption) that currently all brains on a level influence (identically ?) the vermin.

The other solution is to use reasoning and only use those brains you really need to make the level interesting... Common sense and all that.
01-26-2006 at 12:23 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Oneiromancer
Level: Legendary Smitemaster
Avatar
Rank Points: 2936
Registered: 03-29-2003
IP: Logged
icon Re: Brains AI - Not Really a Bug (0)  
The only exception I can think of is when there is an invisibility potion.

Personally, I'm not quite sure that the number of brains has anything to do with the slowdown, but then again I haven't done any testing. I assume that Mouse did do some testing? I know that brains can make Undoing and Restarting to a checkpoint go slow, as the game replays all the moves up until then which includes creating the pathmaps. I'm not sure why this would make a difference with a lot of brains unless they were affecting the pathmaps somehow.

I think it would be best for some example rooms where the slowdown can be quantified better.

Game on,

____________________________
"He who is certain he knows the ending of things when he is only beginning them is either extremely wise or extremely foolish; no matter which is true, he is certainly an unhappy man, for he has put a knife in the heart of wonder." -- Tad Williams
01-26-2006 at 12:29 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Brains AI - Not Really a Bug (+1)  
No, the number of brains in a room doesn't matter. However, "brained rooms" are generally slower to undo a move in or restart to a checkpoint save than rooms w/o brains. Additionally, brained rooms with serpents are much slower. This problem will be dealt with in DROD 3.0.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
01-26-2006 at 03:07 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Mouse
Level: Master Delver
Avatar
Rank Points: 246
Registered: 04-21-2005
IP: Logged
icon Re: Brains AI - Not Really a Bug (0)  
Oneiromancer wrote:
The only exception I can think of is when there is an invisibility potion.

Personally, I'm not quite sure that the number of brains has anything to do with the slowdown, but then again I haven't done any testing. I assume that Mouse did do some testing?

I think it would be best for some example rooms where the slowdown can be quantified better.

Game on,

There are several rooms out there with lots of brains and nothing else, there's even a couple filled with nothing but brains. When you first enter the room, Beethro moves and swings his sword really, really slowly. As you kill the brains he gets quicker.

Malcom, Brock and Dave: Death by Goblins, Level 1, 13N is a great example.

[Last edited by Mouse at 01-26-2006 10:16 PM]
01-26-2006 at 10:16 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Banjooie
Level: Smitemaster
Avatar
Rank Points: 1645
Registered: 12-12-2004
IP: Logged
icon Re: Brains AI - Not Really a Bug (0)  
Yes it does. A lot of brains makes the animation really, really choppy.
01-26-2006 at 11:06 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Jatopian
Level: Smitemaster
Rank Points: 1842
Registered: 07-31-2005
IP: Logged
icon Re: Brains AI - Not Really a Bug (0)  
I confirm what Banjooie and Mouse say. Please note that we cannot all have supercomputers in our respective basements, mrimer. Many of us even lack basements.

____________________________
DROD has some really great music.
Make your pressure plates 3.0 style!
DROD architecture idea generator
01-26-2006 at 11:27 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Rabscuttle
Level: Smitemaster
Avatar
Rank Points: 2460
Registered: 09-10-2004
IP: Logged
icon Re: Brains AI - Not Really a Bug (+1)  
Is it lots of brains specifically, or just lots of monsters? Or lots of brained monsters?

What happens if you replace all the brains with eyes? (there's also one or two rooms like that in MB&D:DBG)

Or have all eyes and one brain?

[Last edited by Rabscuttle at 01-27-2006 12:57 AM]
01-27-2006 at 12:56 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
eytanz
Level: Smitemaster
Avatar
Rank Points: 2708
Registered: 02-05-2003
IP: Logged
icon Re: Brains AI - Not Really a Bug (0)  
I think what Rabscuttle is getting at is that there are two possible explanations:

A - This is caused by having a lot of brains.

B - This is caused by having (any number of) brains plus a lot of other monsters. In the cases described, the other monsters are also all brains, but the game would have been equally slow if they were roaches.

These are very different problems and would require very different fixes, so it's important to test them. Unfortunately, in my home computer I don't get a slowdown in any of these circumstances, so I can't test this myself. I'll try testing it in my office computer tomorrow which is a bit slower to begin with.

____________________________
I got my avatar back! Yay!
01-27-2006 at 01:15 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Rabscuttle
Level: Smitemaster
Avatar
Rank Points: 2460
Registered: 09-10-2004
IP: Logged
icon Re: Brains AI - Not Really a Bug (+1)  
Yes - strictly speaking there's a third possibility - brainedness doesn't matter and it's just the sheer number of creatures that causes the slowdown, but I would expect calculating the pathmap(s) to be significant.

Depends how often the pathmap is calculated though.

warning: thinking out loud
Click here to view the secret text



[Last edited by Rabscuttle at 01-28-2006 11:21 PM]
01-27-2006 at 02:54 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Mouse
Level: Master Delver
Avatar
Rank Points: 246
Registered: 04-21-2005
IP: Logged
icon Re: Brains AI - Not Really a Bug (0)  
Rabscuttle wrote:
Is it lots of brains specifically, or just lots of monsters? Or lots of brained monsters?

What happens if you replace all the brains with eyes? (there's also one or two rooms like that in MB&D:DBG)

Or have all eyes and one brain?

It happens if you have lots of anything. The fuller a room is the slower Beethro moves.

However, the reason I made the initial post was because I thought it was a good suggestion to help speed up the "lots of brains" problem.

The "lots of monsters" problem is quite a different thing. Monsters have to 'do' something (even if it's to go nowhere) whereas a brain's only function is to change the way a monster behaves.
01-27-2006 at 09:41 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
agaricus5
Level: Smitemaster
Rank Points: 1838
Registered: 02-04-2003
IP: Logged
icon Re: Brains AI - Not Really a Bug (+1)  
Actually, the one of the worst offenders are probably brained Seep. Apparently (according to Mike), the seep pathmaps require around three times as many calculations as other normal monsters and the slowdown in a rooms with lots of them is quite noticeable even after 50-100 moves. In fact, if the JtRH beta board is still around, I believe I made a post about lots of Seep and brains and the delay time for undo and restarting after lots of moves (for an existing room I have, after 1000-2000 moves, the restart or undo delay time can be over 5-10 seconds!).

____________________________
Resident Medic/Mycologist
01-28-2006 at 09:46 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Oneiromancer
Level: Legendary Smitemaster
Avatar
Rank Points: 2936
Registered: 03-29-2003
IP: Logged
icon Re: Brains AI - Not Really a Bug (0)  
As Mike mentioned, he has come up with a pretty good solution for this problem in 3.0, but I think it required a fairly serious addition to the code so it won't be included in a 2.0 patch. This would presumably be able to handle the Seep issue as well.

Game on,

____________________________
"He who is certain he knows the ending of things when he is only beginning them is either extremely wise or extremely foolish; no matter which is true, he is certainly an unhappy man, for he has put a knife in the heart of wonder." -- Tad Williams
01-28-2006 at 09:52 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Brains AI - Not Really a Bug ((more a suggestion for improvement))
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.