dimanche 21 décembre 2014

Cognitive Modeling Programming vs Imperative Programming vs Declerative Proramming


I'm reading this article by John Funge about Cognitive Modeling for Computer Games: http://ift.tt/1wSOiZt

And some further detailed reading about it in this URL:

http://ift.tt/1z9wmH0


I'm having a hard time to understand the CML: I understand it's some kind of mix between Imperative and Declerative 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.


Would be glad for any help.





Aucun commentaire:

Enregistrer un commentaire