Archived

This topic is now archived and is closed to further replies.

Wavinator

Inference and crime

Recommended Posts

Wavinator    2017
Just a quick, off the cuff idea... Crime and punishment in most games is absolute. The game system is like a bunch of omnipotent gods that know everything and punish everything. I started thinking about adding an abstract concept of witnesses. Let''s say your running around pirating other ships in a space game. If you''re in the middle of nowhere, and there are no other ships, my thoughts were that you should get away with it. Other ships could jump in during the middle of the foul deed, though, so you might have to hunt down the witnesses. But then I started thinking about evidence and inferences. If, for example, you and another person are seen going into a room, then you walk out and it''s discovered that the other person is dead, we can infer that you (maybe/likely) killed that person. Or, if you''re the only one in a room when something is stolen, we can also infer that you took whatever''s missing. An idea like this could blow up pretty easily, but maybe it''s possible to keep a short list by location of characters (including the player). When a crime is committed, the game system (the gods) notes whether or not there are witnesses. Like with fingerprints / DNA evidence, the location also keeps track of who was there. When the crime is discovered, all of this is checked. Some rule system then determines whether or not the person who actually did the crime gets fingered, or some innocent character or the usual suspects. Even without direct evidence, then, it might look as if clever NPCs used inference to figure out whodunnit. (I need to reason this out more, but just wanted to see what people thought.) -------------------- Just waiting for the mothership...

Share this post


Link to post
Share on other sites
WarMage    122
Sounds like that old skool Hacker game where you had to collect strips of a secret document to thwart the evil boss.

You would have to add some kind of tracing to your NPC data, that gave the NPC somewhere to "store the memory" or something, then expose that to the game scripter. Leave it like a bucket in the NPC, and you can code various things in it''s memory based on either game time, or the specific event, if it''s a storyline element. then later when some adjudicator or litigator NPC asks questions (ie "where were you when Sam Spaghettio was found dead?" or "do you recognize the defendant?") you would have some unique way for the witness to respond (or be capped in a hail of chaingun fire, hey!).

The only drawback is that you''re either defining a very loose AI, or you''re creating a lot of resource strings to be used by the NPCs
---------------
-WarMage
...anything worth doing, is worth doing depsite cost and schedule overruns. By that logic, Daikatana was not worth doing, NOW WAS IT?

Share this post


Link to post
Share on other sites
bishop_pass    109
quote:
Original post by WarMage

The only drawback is that you're either defining a very loose AI, or you're creating a lot of resource strings to be used by the NPCs


NPC memories and strings and inference. Hmmm. Yes, it rather sounds like a loose AI, something like a hack. Not that that is bad, it's just that it only does one thing, and only sort of well most of the time.

After looking into ALP, CLP, SQO, and FOPC (today is my day for acronyms) I can't claim to be any closer to a fast solution which scales up well, but I do know the proper and general way to handle this. Now, if we could just find the efficient algorithm for it.

On a side note, for those AI types, Lenat's twelve dimensions of context place knowledge within a framework which describes its relation with regard to context. Two of the dimensions are time and place.

Ok, enough rambling, because nobody knows what I am talking about. Some do, to a point, but I have not completely sold them on it yet. I have been looking into Stanford's KSL department (Knowledge Systems Laboratory), and they have been doing research on efficient inferencing with common sense knowledge. It appears a very good scheme is: reduce a set of knowledge statements (first order logic) to disjunctive normal form (a set of disjunctions) and then given that graph, partition it based on maximum flow. This drastically reduces the search of resolution refutation, and can lead to fast common sense reasoning.

Ok, "What the heck are you talking about!?", you are saying. Well, what I am saying is a series of steps to create a system that is robust and flexible for storing knowledge about the world and reasoning about it in a logical way. Does it scale well and is it fast? Very possibly, but I am not the expert on it.

What are the steps?

1) Parse First Order Logical statements. This is relatively trivial.
2) Reduce to disjunctive normal form. Again, fairly simple.
3) Partition the resulting graph based on maximum flow. Kind of hard, but worthwhile. Have to understand the algorithm first.
4) Apply resolution refutation to the knowledge base using the partitions to constrain search. Simple to understand, but requires finesse to program.
5) Incoroporate into a game. Fun and rewarding, but ultimately not proven.




Edited by - bishop_pass on June 27, 2001 12:13:13 AM

Share this post


Link to post
Share on other sites
Nazrix    307
The people making the MMORPG called Gryps are planning to be able to handle this but I've no idea how involved or how much they have though it through.


Edited by - Nazrix on June 27, 2001 8:06:53 PM

Share this post


Link to post
Share on other sites
Gaiiden    5710
I agree the implementation of such a system would be difficult, but not impossible. It would also be very rewarding and could add a lot to gameplay. I such a system existed in a gangster game, the player could finger other gang members for pulling off crimes by luring them to the right spot, then pulling the heist while maintaining an alibi or something. It would be cool to have a game centered around setting other people up, cause figuring out how without get caught yourself would be challenging. Of course the AI would have to be less god-like so other people could be blamed. Like in a store, instead of recording the positions of every player in at the time of the crime, maybe only record those that can be seen by the security cameras and other people. It''s not hard to calculate field of vision. Anyways that''s just my .02$

==============================
"Need more eeenput..."
- #5, "Short Circuit"
==============================

Share this post


Link to post
Share on other sites
Nazrix    307
This is another one of those perfect situations where there could be basic rules that determine how the world reacts and the player could creatively use those rules in various ways. There's got to be a very solid way to do it, and it seems more of a design issue than a programming one to me (waits for Bishop to bring up Soar j/k).

Edited by - Nazrix on June 27, 2001 11:24:40 PM

Share this post


Link to post
Share on other sites
kseh    3838
Here''s what I''m thinking...

An explosion registers on Stellar Security''s sensors. Protocol demands they must investigate depending on their resources and other priorities. A unit is dispatched and upon arival they find the remains of a small cargo vessel. Being a department of the gov''t, they have all the latest sensor equipment so they determine the attacking craft''s weapon and propulsion signiture. This information is sent back to base and processed. There are 100,000 known ships in Security''s database. 10,000 have the appropriate weapons and propulsion. Of those, 500 belong to known criminals. 20 of which are in the area. Warents are issued and units are dispatched to search these ships. If incriminating evidence is found, the captain and crew are arreested and the ship impounded (or some such thing).

Of course, maybe not all ships are registered. But then if the cargo ship was carrying 10 tonnes of ChemicalX with a street value of approximatly 10,000,000 credits then such a large jump in bank accounts might warrent some investigation. Further, if some citizen, say a fuel attendant, notices the cargo he might provide a description of the ship to Security in hopes of a reward.

As for something like investigating an assasin for hire... well I haven''t thought about it. But I''d think it''d be easier to track the physical evidence and bank accounts. In an enviroment where a large number of crimes can be taking place, who has time to investigate if a witness is telling the truth?

And hey, who says the justice system has to be fair? Just check vs maybe 10 or so different pieces of evidence, and if an innocent person fits the profile and goes to prison as a result, maybe it adds some attmosphere to the game.



Share this post


Link to post
Share on other sites
Gaiiden    5710
heck, this could be a whole game in itself It would be great for a detective game, as Kseh pointed out, and as a gangster game. Or maybe one game that implements players who can play on both sides of the law?

==============================
"Need more eeenput..."
- #5, "Short Circuit"
==============================

Share this post


Link to post
Share on other sites