[ODE] OT: virtual creatures in games
John DeWeese
deweese at ict.usc.edu
Tue Mar 25 16:55:02 2003
I've had a few thoughts about this which might be fun to share. First
of all, you have to ask what kind of game you want to make, but given
that simulating an articulated creature takes a lot of investment in
programming time and run-time computing, it is likely to be a primary
feature of the game. If you have enough computing power, you can make
it secondary and special-effects related if you so desire.
Problem the first: traditional AI algorithms for path planning,
decision making, etc. assume that the unit being controlled behaves
predictably, i.e. that it will trivially (perhaps eventually) converge
on a state, or die trying. Bad AI happens when the units get stuck, or
start moving somewhere wierd like a live fire zone, but it's worse when
you can't even guarantee if you virtual creature can move where a high
level planner wants it to move. If you cannot guarantee this of your
virtual creatures, you must limit their role to playthings (as in an
exploration or toy game) or special effects. On the other hand, it
would be very nifty to develop a framework which allows you to make
some statements about what conditions are necessary for convergence
(e.g. moving to a target) or divergence of a given creature. There may
be some research on this out on the web. Karl Sims had a video of a
little swimmy thing following a point, and it would follow it pretty
well. If you've got some consistent directed locomotion, I believe you
can start to design some meaningful higher level AI.
One BAD thing to do would be to place the user in direct control of the
creature, as in Quake... unless you can make some guarantees that the
creature will do PRECISELY what the user expects when he or she expects
it, which is difficult. You may have to come up with a hybrid kind of
scheme, with some direct control and some implicit simulated control.
What happens if you want to evolve the creature in-game? Well, lots and
lots of waiting for one. Boring! That is, unless it's a "digipet" kind
of game, which has different requirements.
Regarding resource usage, you'll have to time it yourself according to
the kind of creatures you have running around! This very much depends
on your specific code. Very jointed creatures are a waste, of course.
Neural networks should be pretty cheap if you keep the node count low,
and most virtual creature projects have relatively small neural
networks, on the order of 10 to 100. Memory is cheap!
Finally, lack of control of basic gameplay principles like movement (as
I mentioned before) generates big problems for a game designer setting
challenges for a player. Often in a game you want to advance the state
of a story or something of the sort, and in order to advance you
require that the player accomplish some goal or solve a problem using a
skill. If the player operates on different rules of movement or
interaction than your assumptions, you as the designer will no longer
have control over how the player is rewarded regarding goals and
stories! If you require the player to evolve creatures for every task,
this is expensive and the player will have difficulty exploring the
space of what each creature can do. This might not even be a bad thing,
but it is at least LOTS more difficult if you can't consistently teach
all players a skill! This topic needs more discussion, though, since
you may very well come up with a method to solve this problem or make
it irrelevant and still make a game fun.
Sorry for the long post...
John DeWeese
On Tuesday, March 25, 2003, at 12:13 PM, gl wrote:
>
> Sorry for the (sorta) OT post, I promise it's a one off, but I know
> there's
> a lot of people here that have worked on virtual creatures.
>
> Without having done any work in AI (though I understand some of the
> principles behind neural nets in general), I'm wondering how feasible
> simple
> learning creatures and/or fully evolved creatures are for use in a real
> game.
>
> Using the simple creatures that learn to walk/crawl/jump as an
> example, how
> heavy are they on system resources (both memory & CPU)? I'm really
> asking
> about two cases:
>
> a) where you have evolved a creature in a seperate app to a sufficient
> level
> of intelligence, and just want to use its brain as is in a game,
> without
> further learning ability - how much memory would its brain take up
> (roughly), and how CPU heavy would a logic tick be?
>
> b) where you want the creature to continue learning in-game to make its
> behaviour more interesting and unpredictable. Again, what are the
> resource
> drains?
>
> I'm only after very rough guides - any insight would be appreciated.
> --
> gl
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode