A.I. game prototype

Friday, April 14, 2006

Why I started on this project.

draft version

After reading all the hype of how good the A.I. was going to be in Oblivion, I didn't believe that it would be that good, but I at least expected them to implement a somewhat decent reaction planning system. But what did it have... a very basic limited production system. While you could maybe argue about the differences between a good production system and a reaction planning system, I just am not impressed in the slightest by the way the A.I. is handled in Oblivion.

You can't even define the "rule" that will be run when its conditions are met. All you can do is set a rule as one of a few basic behaviours/goals and what the target should be for that behaviour, and then set some conditions for that "rule". So you can say set a rule/goal/behaviour as a walking action and then set the target of that, to the place where you want the character to go. Then set some conditions (including what days and hours of the week) and set its location in the list of rules. The first rule that is found that meets its conditions will be run for the next in-game hour (if this behaviour is finished before the hour is up then the standard outcome is for the character to just stand in the same spot until the next hour starts and a new rule/goal can be used).

There are just so many limitations in the way they have done it. Also their scripting language (which can't be used to make new rules) is so limited it is not even funny, while in Morrowind the scripting language at least had "while loop" support, this has been removed from Oblivion.
Plus the fact that there are very few ways of finding out about a characters surroundings. To make the system into a at least half way decent one, they at least need to implement a decent perception system for the characters/agents, and allow access to this from the scripts.

The General feeling in the Elder scrolls modding comunity seems to be that the makers have tried to place quite a few limits on what the modders can do. One of those other limits is that it seems like two mods(plug-ins) can't interact with each other, so one plug-in can't use objects/scripts, etc which are defined in another one.

Still as a game, Oblivion is quite a good one. The graphics are great, there is a nice big open world to explore with lots of Quests to do (the jury seems to be still out on the leveling system) and the A.I. is better than most rpg games. At least the Npc's do move around and do somethings. It is just the fact that they hyped it up so much and they didn't even bother implementing a decent system, either a better production system or a reaction planning system ( reaction planning systems have been used in some other games for at least 7 or 8 years).

When I bought the game, my intention was to start working on some mods if I got the time, but after looking through what could and couldn't be done and looking for ways around some of those limits I decided that is was just not worth it, so I gave up on any idea about modding the game.

So I thought about just why so few games seem to pay much attention to the A.I., when there is so much talk about improving the A.I. of games (some years it seems like half of the Gdc is about A.I. but there is just so little action).

I guess in the end it comes down to some of the same reasons why there is so little originality in game types and game play: A unwillingness to try new things because of the risk, so they stick with what they know/think works. Deadlines and the risk that a new A.I. system might not meet a deadline. Time and money in general and the belief that graphics are what sells a game, so they put most of their effects into those. Plus a general lack of A.I. knowledge in the industry. So we continue to get the tech demos which look great but are lacking in most other areas.

The game industry really needs to start looking at some of the research that is being done into game A.I. in the universities around the world.

So this project is my attempt to see what I can do with regards to A.I. in a game and to try out some ideas. At first I certainly don't expect anything new to come out of it, I need to try some things out and then decide where I should put most of my effects. There is also the question of time, and just how much time I will have to work on this.


Thursday, April 13, 2006

A.I. game prototype

I'm currently just finishing off version 0.1.5 of the prototype engine. It is currently in a state which would allow a basic "the sims" type game to be made using it. I expect the next few versions (maybe upto about version 0.5.0) to be spent on mainly improving the low level engine, before I start working on the high level A.I (the main purpose of making the engine in the first place).

One thing I want to look into during the low level development is allowing multiple behaviours to be running at the same time. So that if the character picks up a object (say a drink) and then starts towards a chair to sit in, but as they walk past one of the kitchen counters they see the chocolate cake sitting there, waiting for them to eat, they can then start up another piggyback behaviour (script) that will divert them to the cake and pick up a peice. The piggyback script will then allow the original one to continue the movement to the chair. Once the character is sitting down then the piggyback script will either still be running or a new behaviour script will be started to make the sim eat the cake while at the same time the original script is making the sim drink.

This will need for the animations to only effect the arm (leg in some cases?) that is required for each task, freeing the other arm to be used by a different behaviour (in our case, picking up and carrying the cake). At first I hope to avoid having to implement I.K., but I do want to add it at a later stage, as well as try out a range of procedural animation techniques.