I'm reading this article by John Funge about Cognitive Modeling for Computer Games: http://www.qrg.northwestern.edu/resources/aigames.org/1999/fungegame99.pdf
And some further detailed reading about it in this URL:
http://www.msci.memphis.edu/~classweb/public_html/comp7990/Spring2000/Wally/Presentation5/tsld014.htm
I'm having a hard time to understand the CML: I understand it's some kind of mix between Imperative and Declarative programming, I just didn't understand how:
For example the following pseudo-code in Imperative Programming:
Declare a new List called ExpensiveItemsNames;
Foreach Item in Items:
If ItemPrice > 100 then
Add ItemName to ExpensiveItemsNames
vs the Declerative version: (using SQL)
SELECT ItemName FROM Items
WHERE ItemPrice > 100
What would be the CML version of it?
And how does CML help the programmer? I didn't understand that too.
As well, in the further detailed (as mentioned before - meaning the second link I put) website they also talk about pruning to reduce the space complexity.
While I know what is pruning, I couldn't understand it's relation to CML. They look like two unrelated things to me at the moment.
And also regarding pruning - in the original article it is not mentioned, but in "further detailed" website it mentions later a preprocessing stage - I didn't understand if it's related to the CML or not.
Ok, I understand that my initial saying that CML "it's some kind of mix between Imperative and Declarative programming" isn't true (though it is written in the article: "...but the distinguishing features of CML are the intuitive way domain knowledge can be specified and how it affords a game developer familiar control structures to focus the power of the reasoning engine. This forms an important middle ground between regular logic programming (as represented by Prolog) and traditional imperative programming (as typified by C)"
As far as I understand CML should answer these problems:
1. "if we are
not extra careful about how we represent a character’s
knowledge we can deprive them of “common sense” as
they reason about the effects of their actions. What is the meanin of "extra careful" and how does it affect the "common sense" of the character? And how does CML help?
2
. "how to provide a convenient
mechanism to allow the programmer to strike
a balance between lots of fast pre-programmed behavior
and more expensive run-time decision making".
I have my assumptions to this, but i'm not convinced they are true:
If we use only pre-programmed character, then the complexity can be also very hard to program and also very complex in terms of memory and the pre-processing running time.
However if we use only run-time decision making, then the character will be very "stupid" or it will have to start calculating a lot each step.
CML provides something in between, in the form of "reasoning engine", which fills details during run-time.
I didn't understand though how CML does this.
The article mentions it does calculations every once in a while: "In this way a character can anticipate that after
a certain time period, or event, it will be ignorant of some
aspect of its world, and it can plan to sense and re-plan. But i'm not sure I understood correctly.
The "further detailed" link mentions pruning, though the article doesn't. Perhaps this is a necessary part of CML?
3. "by using interval arithmetic to integrate sensing
into our underlying theoretical framework, we enable
characters to generate plans of action even when
they find themselves in highly complex, dynamic virtual
worlds.
I think the meaning of "interval" here is the space of what the character knows, and not the time intervals mentioned earlier. Is this also a necessary part of CML?
So those are a few more questions I would be happy to understand better if someone knows.