URCS
Quagents Home
Quagents: Overview
Quagents and Bots
See the Quagent Technical Report
The model we are using is that the bots in the Quake II world are
strictly hardware. In a real game, they have "think" functions that
may or not have "mod" capabilities can be modified by the players.
In Quake II, as we have seen, the bots come with a certain amount of
Innate Intelligence , which we have ruthelessly
stripped out.
For us for now,
they are commandable with a finite set of commands and they have
certain reflexes that prompt them to tell you about certain events.
All
the intelligence therefore is offboard, outside the game, in
the programs you write (presumably in Java or Lisp or C or
C++). You can communicate with the game and vice versa
(again, for now) only through a protocol. Your program sends and receives
strings
with keywords and parameters (and you can receive binary data as
well).
The Quagent is thus the combination of the bot in the game and your
controlling software.
You can spawn multiple bots. Each one will
have its own "private line" through which you communicate to it, so
you won't get them mixed up.
Objects in The Quagent's World (or Quagent Ontology)
The entities in the Quagent's world may change as we add more
functionality. The issue is the Quagent's state, perceptions,
actions, and what are the interesting objects in its world.
- Time: the quagent's world advances in 1/10 second intervals
called "ticks".
-
The Client (the first-person shooter). The game still has this
character, and by default you see through his eyes. He can move
around, interact with bots,
presumably he can
still shoot things, etc.
We have disabled his "auto pickup" property so he can't intentionally
or inadvertantly change the bots' world too much.
He raises a few interesting possibilities for agents dealing with dynamic
and uncertain worlds!
-
Walls and windows. These are things the quagent cannot walk through.
-
Items: box, gold, tofu, battery, data, kryptonite, head.
You can spawn these things in locations you specify.
-
Other quagents. You can spawn more than one quagent and control your
bots with different controllers.
Quagent State
Quagents have an internal state influenced by what happens between it
and the world.
- Position (X,Y,Z)
- Orientation (Roll, Pitch, Yaw) (most importantly for us, the
"yaw" is the robot's "current direction", and most commands and
reports are in coordinates that take the current (X,Y,Z) as the origin
and the current direction as 0 degrees.
- Velocity
- Inventory (List of items in quagent's possession)
- Health
- Wealth
- Wisdom
- Energy
- Age
Laws of URQuake
You can discover for yourself how the game works: there is something
like normal physical laws running the show, but there are many tricks
being used so some information you think should be available is either
not there or hard to get. The following laws define special ways our
Quagents react to things in the world.
- A bot is spawned upon connection to the game. Often this happens
in the bot constructor function.
- Disconnecting kills the bot. This may be useful if the "laws of
nature" you program include fatal consequences besides the built-in ones.
- All items but boxes can be walked over; boxes block walking.
- All items can be picked up.
- Picking up (Dropping) Tofu increases (decreases) Health.
- Picking up (Dropping) Gold increases (decreases) Wealth.
- Picking up (Dropping) Data increases (decreases) Wisdom.
- Picking up (Dropping) Battery increases (decreases) Energy.
- Picking up (Dropping) Boxes just means bot has a(nother)
(one less) box.
- Picking up Kryptonite means energy decreases by
the same amount as if it were within the "near" range (see below).
- Increased Wisdom increases perceptual abilities. In particular
the maximum radius for the RADIUS command and the number of rays
allowed in the RAYS command go up. If this linkage is irrelevant to
a particular quagent scenario and experiments, the initial wisdom
value can be SET to or above the value of High_Wisdom.
- Age increases every tick. When lifetime exceeded, quagent dies.
- Energy decreases by a small amount
at every tick. When energy
goes to zero, bot stops moving. Everything else still works,
including Pickup, so another bot could give
it batteries.
- When Health goes to zero the bot dies.
- If Kryptonite is within a "far" range
it further decreases bot energy by a little at every tick. If it is within a
"near" range it decreases bot energy by more at every tick.
- The bots have been scarred by their previous lives, and suffer
from post-traumatic stress syndrome. If teased, they
can exhibit violent flashbacks.
System Parameters. These are set by the system and are not settable by
the user: (so far chosen pretty much at random -- CB).
- An item must be within distance 60 of the bot
for Pickup to succeed.
- Health-increase and decrease per Tofu Pack: 10.
- Ditto for Wealth: 10
- Ditto for Wisdom: 10
- Ditto for Energy: 10
- Far range threshold for Kryptonite: 200
- Near range threshold for Kryptonite: 100
- Energy loss per tick: .1
- Age gain per tick: 1
- Extra Energy loss for Kryptonite within far range: .1/tick
- ExtraEnergy loss for Kryptonite within near range: .3/tick
- Initial Maximum radius in RADIUS command: 40
- Initial Maximum number of rays in RAYS command: 4
- Ultimate Maximum radius for RADIUS command: 200
- Ultimate Maximum rays for RAYS command: 72
- Maximum radius in RADIUS command: See below.
- Maximum rays in RAYS command: See below.
- Default initial Health: 100
- Default initial Wealth: 0
- Default initial Wisdom: 0
- Default initial Energy: 1000
- Default initial Lifetime: 10000.
- Default High_Wisdom: 100 (value at which all benefits of wisdom
are realized.)
- Default initial Age: 0.
- Maximum Distance at which PICKUP succeeds: 60
For rays or radius, if M is the max we want to compute, I is the
initial max, and U is the maximum max we can have, how about
M = I + (U-I)* min(1, (Wisdom/High_Wisdom)).
So you max out your perception when wisdom goes to 100.
Quagent Communication and Interaction
As of this writing (1/27/04) communication between quagents (not bots)
is easy if they are all running in the same program. It may be a
little harder (and non-uniform) if they are not. Right now we are not
using game facilities to do communications since they are set up for
client to client communication.
As of now, think about the quagent programs, the controllers,
communicating, not the bots communicating. It's like the language and
reasoning
centers are up in the controller. So one quagent can broadcast, or
target another particular quagent, or all quagents within some
distance, with "messages" that can be interpreted by the other quagent
(controller.) Thus stylized behaviours, or sequences of actions, can
be scripted: Quagent A can be low on GOLD but have a lot of HEADs, so
it could broadcast "OPENFORBUSINESS", whereupon B could decide to swap
GOLD for a HEAD, and so the controllers would cooperate by running
off the necessary walk-over-to, drop gold, drop head, pickup head,
pickup gold actions.
Likewise there could be a STEAL interaction that could be built same
way,
failing if the desired item is not held, OR one could implement the
capability of A inquiring of B what its inventory is. Again the
whole
transaction would be mediated by the quagent code, not the bot code.
A good quagent-quagent communications protocol would be a nice
contribution.
If You Want To Play God...
Just generalizing from the last section a bit.
If you think about it, some of the basic laws of how bots interact
with the world could
easily be enforced by your quagent controller. For instance, to enforce
weakening around kryptonite you'd write the same thing we did...check
for kryptonite and decrement some "health" variable accordingly. In
fact there is no reason you can't build complex phobias, social
behaviors, health quirks, prioritized but conflicting motivations,
whatever! The
causes, effects, and interactions can all be overseen by the
quagent controller. This would be just another layer of simulation
overlaid on the existing minimal bot capabilities. So don't be
frustrated if the bar bots seem to have a minimal inner life (sort of
a physical body and maybe an id). You can build the ego, superego,
etc.
in the controller.
Another way of saying this is that you can build and extend many
quagent
functionalities yourself and you should not feel constrained by the
limited
amount of on-board "wired-in" bot characteristics we supply.
Quagent Protocol
Bots are controlled by and communicate with quagent controllers using the
Quagent Protocol .
Last updated:
by costello