Clisp and expert systems design

Hello, I'm trying to create a rule-based expert system from scratch using the LISP language. I'm using the Clisp compiler for Linux (slackware distribution) and I'm wondering how exactly i'm going to use lisp to define the facts and rules of the expert system. Basically I'm stuck, can anyone help? Thanks.

Comments

(1) Read my postings about CBOOP and the expression-based language that derives therefrom.

(2) Lisp is essentially an expression based language.

(3) Step away from the lisp paradigm and think of rules as expressions. An expression is a rule. It is an equation (process) or rule (test) that produces a result which ultimately reduces into a branch process.

Ok thanks a lot. I'll check out your postings about CBOOP. And I guess I need to study the Lisp language even more then. I'm creating this expert system because it's basically the topic I was assigned by my supervisor for my final year project. I'm supposed to design the basic shell of an expert system which can then be applied to any field of expertise. My supervisor is hoping we can apply it to vehicular traffic analysis. But for now we are focusing on building the shell first.

Expert systems to analyze traffic? Consider the concept of ants. There is a person (I cannot remember who), that wrote a paper on the behaviour of ants and used that study to create software for logistics problems.

His system did not focus on expert systems per se. He solved the expert system problem using Object Oriented Programming (C++). The basic object was an "ant" that travelled defined circuits in arbitrary patterns to find the shortest, fastest and cheapest routes from point a to point b. Another package was then able to analyze the results and move from there.

The idea is to create a basic object (map) and multiple other objects (ants). The ants seek satisfaction (food) at point b of the map but they only have a finite amount of energy and time to reach the food before they die (starve). If an ant comes to an intersection it is possible that the ant could spawn other ants to cover all intersections. But be careful here. If your map is too complex then you will exhaust the system resources.

Thanks a lot for your support. I'll definitely try and do some more research into all you've said. Thanks again.

: Expert systems to analyze traffic? Consider the concept of ants. There is a person (I cannot remember who), that wrote a paper on the behaviour of ants and used that study to create software for logistics problems.: : His system did not focus on expert systems per se. He solved the expert system problem using Object Oriented Programming (C++). The basic object was an "ant" that travelled defined circuits in arbitrary patterns to find the shortest, fastest and cheapest routes from point a to point b. Another package was then able to analyze the results and move from there.: : The idea is to create a basic object (map) and multiple other objects (ants). The ants seek satisfaction (food) at point b of the map but they only have a finite amount of energy and time to reach the food before they die (starve). If an ant comes to an intersection it is possible that the ant could spawn other ants to cover all intersections. But be careful here. If your map is too complex then you will exhaust the system resources.: : : ****************************************: Excellence Breeds! Go Hard or Go Home.: : Let Penguins rule the earth. : Break some windows today.: :

(1) should you choose to take the 'ant' concept into your project, remember that the map does not need to be a map per se. the map is mere ly a network of points. For instance, you might create a map of linked points (intersections and destinations). The links between each point (node) in the map would define the distance and other properties in the path from node to node.

(2) ants should be able to request information from the map to determine the energy consumed by travelling the map. Likewise, the ants should be visible to the map. This will allow the map to constrict travel due to congestion of multiple ants attempting to traverse the same link (path) in the map.

(3) you can reduce memory overhead by creating a database of the real map your conceptual map represents. The controlling program then only needs to load and render nodes for the map areas in which ants are active. However, you must allow ant behavior to give the map feedback. Thus the map should be able to store its data to the database for later reference.

(4) a tracking program should be able to watch the ants by recording the properties of the map. Recording the individual "experiences" of the ants may yield useful data as well. But this all depends on perspective and mission.

(5) As for this being reusable in other areas: the ants will travel any map. The actual application of the concept is not limited to traffic patterns. Depending on the properties of the map, the concept could be applied to logistics, finances, networking, purchasing, inventory management, etc. The key is the map. The map determines the behavior of the ants. The construction of the map is a conceptual rendering of some real problem.

**** SOUNDS LIKE A GREAT PROJECT ******** KEEP ME POSTED ON THIS ONE! ****

: I'm trying to create a rule-based expert system from scratch using the : LISP language. I'm using the Clisp compiler for Linux (slackware : distribution) and I'm wondering how exactly i'm going to use lisp to : define the facts and rules of the expert system. Basically I'm stuck, : can anyone help? Thanks.: Like you say, the key to expert systems is facts and rules. In Prolog, facts look like:-

father(luke,darth).farther(darth,adam).

And rules look like:-

grandfather(X,Y) :- father(X,Z), father(Z,Y)

The idea of a rule is that you prove the goal on the left of the ":-" by proving all of the things on the right. So you need a store of facts and rules, and with each rule you need the goal (e.g. its name and parameters), then a list of the things you need to prove in order to prove that rule. You keep doing this until you get back to the facts (or find that you don't have any).

I can try and go into more depth at some point, but that's the basic execution model.

: The problem with rule-based programming is that it is too rigid and : incapable of flexibility and adaptation.: : Neural nets and other schemes have proven more adept at problem solving : and analysis.: That may be true, though I was answering the question, which was about rule based programming. :-)

: : The problem with rule-based programming is that it is too rigid and : : incapable of flexibility and adaptation.: : : : Neural nets and other schemes have proven more adept at problem solving : : and analysis.: : : That may be true, though I was answering the question, which was about rule based programming. :-):

***So, if someone asked about shooting themselves in the back side would you suggest the calibur rifle and proper method of aiming at one's rear? I would prefer to recommend a more appropriate solution. :-)

P.S. You are a crafty devil by the way--I like the style. Too bad we don't have the time to organize a project.