AI using instruction sets

Started by
17 comments, last by RunningInt 18 years, 5 months ago
Quote:but I'm trying to develop a mechanism such that instead of programming the AI to do anything specific, I just give it the basic functionality (call it a virtual machine, re-inventing lisp, or a table driven program, I just call it an instruction set) such that these complicated behaviors can just kind of emerge, instead of the computer explicitly being told what to do (when I have this goal I must perform the following actions).


I'm sorry to tell, but this is impossible. :-D Unless you're creating some kind of world other than ours. You just can't make a random program to pick correct actions based on goal it wants to achive. Just think about how you're going to make the actor open the door when the door bell rings? In the end you'll have to specify actions for goals anyway, and end up with goal choises. You're just making it more complex. More interesting thing would be to give the actor basic set of knowledge (the door must be opened after door bell rings), and try to write AI that would operate based on that.
Advertisement
Use genetic algorithms to write your program (genes = instructions)? Could take a VERY long time to "train" it to do anything interesting though.
I don't see anything new here from a standard programming language. You're basically authoring a CISC microprocessor simulator, right? And each "instruction" is essentially a call to a high-level function? What exactly is new about this concept that a language such as C doesn't already provide?
h20, member of WFG 0 A.D.
The difference is "from any one instruction, you can jump to a wide variety of other instructions based on fuzzy logic (or a trained neural network or similar)", as stated in the first post. Personally I doubt the merit of the method but perhaps there's something in it.
Being an MPU enthusiest I can see the appeal of the concept - essentially you are building a macro engine by defining the fundamental "moves" of the AI. For example I suppose you could define the classic Zork directional movements East, West, North and South and by calling a North and an East instruction you will have invented "NorthEast"... and yet you haven't because the actual instructions will be followed one after the other, unless you have some nice way of combining instructions based on say, vector math. That of course means that if you have anything other than movement in mind then you must have the same dimensions for any of those than can be combined too (not that it couldn't be done of course, just more to think about).

I actually intend to try this out myself if I get that far with my game, based on a learned table of instruction macros from successful previous outcomes of traditional searching. At least in a limited knowledge situation these may be somewhat applicable even if the initial situation is not identical.

-Cam


Instructions usually have operands (parameters).

Are you going to have all global/environment data and instructions
that manipulate only that kind of data (then you need some kind of context control/declaration/passing ).

If-then capability ??? Hard to make anything smart that requires all decision logic to be predefined in static 'instructions'.


Such useful things suddenly make a 'simple' language explode in complexity..
No, I'd do it based on a hash-table. Perhaps like how a transposition table is used? I don't know much about them though so I might be wrong.

Rather than have if-then behaviour they could simply be used as a generalised sub-tree optimisation or heuristic, possibly improving search.

Like I said, it's something to play with in the future.
tthibault,

Sorry to have to break it to you, but you've just reinvented a Holland-like Classifier System. In Holland's CFS:

- instructions are internally encoded as byte strings
- instructions may trigger other instructions or operate on the domain (by reading sensors or activating actuators)
- instructions survive based on their performance in the contexts in which they are triggered
- the instruction set is evolved using genetic operators
- the interlinked chains of instructions form a Hebbian network

The only difference I can see at this stage, is that Holland's instructions trigger based on an internal auction system (where they bid using their performance index as currency), while your triggering seems to be deterministic based on either a fuzzy rule set (which is certainly not random btw) or a linear/nonlinear mapping encoded as an ANN.

I highly recommend you read Holland's work...

Cheers,

Timkin
The code looks nice and your plan sounds interesting yet I honestly don't have a clue what you are planning to do, so I will ask some questions.

Quote:Nothing terribly complicated about this, but imagine extending it such that you might have these various functions for ai:

-Calculate Pitch/Yaw
-Find new destination
-Attack
-Patrol


would you write these functions yourself?

Quote:But, you could also make very very specific functions for even more complicated behavior, i.e, calculate pitch/yaw could be broken down into more fundamental instructions, i.e:


would you write these functions and instructions yourself?

Quote:-Perceive target, estimate target (based on a neural network 'perception' of reality, i.e something that simulates a retina instead of using exact math...could make the results more interesting and less certain/perfect)


What does estimate a target mean? How can you simulate a retina using a neural network? Why would you want results that are less certain or less perfect?

This topic is closed to new replies.

Advertisement