[DGD] Speed Up?
Jorn.Bakker at phil.uu.nl
Jorn.Bakker at phil.uu.nl
Mon Apr 7 20:44:13 CEST 2003
Hi there,
> It appears as if you may have modified Melville quite extensively.
> In unmodified Melville 0.9.1, heart_beat is defined in auto.c, so
> every object has it. It is not turned on automatically, so unless
> you invoke it, it doesn't do anything. What it does after that
> depends on what code you write for the heart_beat function.
>
I understand now that I made things a bit obscure. The MUD is
based on the Melville MUD-lib. What I didn't mention was that
the initial work on the MUD was done by a friend of mine who
indeed edited the MUD quite extensively. The 'tick' function was
made apart from the 'heart' from the original MUD-lib. The idea was
that my friend needed a slower controlloop for monsters and NPC's
to act in the environment. This could have been done with the existing
'heart'. But we now have this system and it works.
I wasn't aware that the 'tick' was not standard in the MUD-lib, so
I'm sorry for the confusion.
> In unmodified Melville 0.9.1 there is no such class, although
> it'd be reasonably easy to create it (and if I ever work on
> 0.9.2, that's on my list of things to do). Creating it would
> involve nothing more than dividing player.c into two files,
> one containing the code that is specific to the telnet
> connection, the other containing the code generic to all
> types of living objects. I presume you did something like
> that for your mudlib?
>
This is indeed the case. All living things inherit from 'Living' including
agents, monsters and players.
>
> I presume this is also something you added. Is there a reason
> to use a separate function, rather than having this attached
> to the heart_beat? I think it would be more efficient to
> maintain only one chain of call_outs, and have the heart_beat
> in living.c invoke a function for your NPCs. I'm not sure of
> that, however.
>
I'm not sure what the computational implications are. It might not be an
optimal solution.
But we work with dynamic monsters and NPC's and it seems to work fine.
>
> I'm still not sure what you're trying to do, or what your
> problem is. Is the problem that your heart() function is
> never getting called? Or your tick() function? Your recursive
> calls look fine, although they could break if there is an
> error in the code above them. But you have to make the first
> call to those functions externally to start the chain running,
> and you haven't given any indication of how that is done.
This indeed the case. If I startup I log on to start the chain (how
sophisticated).
Not only to start the chain but I can monitor the behaviour of the agent
online this way.
>
> I would join in the general warning that you probably want to
> set rather long tick times, because of CPU demand, unless you
> have a very fast machine with nothing else to do.
>
> Steve Schmidt
What I'm aiming at is the following. I'm currently doing experiments with
my agents.
This means that the MUD is running with monsters and an agent in the world
(it's not running on a network, only local). The world itself is very
small (3 rooms). The agent
needs to perform a lot of actions in order to receive enough information
(which will enable it to learn). Currently the number of actions is one
per second. What I want is to
increase this number. But you are probably right in saying that one needs
a very fast
computer. In that case there's nothing to be done exepct looking for
another machine
to run it on.
Thanks anyway, I apologize again for the obscure way of posing my question
earlier on..
gr
Jorn Bakker
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list