Cognitive Modeling Language (CML) vs Imperative Programming vs Declarative Programming

84 Views Asked by At

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 Declarative 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.

0

There are 0 best solutions below