AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Planning capability added to ChatScript 3.6
 
 

ChatScript has long been more than a chatbot language. It has been a natural language tool that incorporated fact triples and a programmable query language that allowed you to create brains that can inference and do arbitrary graph searches.

With ChatScript 3.6 the “brain” capability has been improved.  CS now contains a built-in planner capability (new doc). If you want to control an avatar, you could tell it to do something and it could plan out the steps and carry it out (if you scripted plans). You can “recreate” SHRDLU box world if you want.

Here is a classic SHRDLU demo sequence:

Person: Pick up a big red block.
Computer: OK.
Person: Grasp the pyramid.
Computer: I don’t understand which pyramid you mean.
Person (changing their mind): Find a block which is taller than the one you are holding and put it into the box.
Computer: By “it”, I assume you mean the block which is taller than the one I am holding.
Computer: OK.
Person: What does the box contain?
Computer: The blue pyramid and the blue block.
Person: What is the pyramid supported by?
Computer: The box.
Person: How many blocks are not in the box?
Computer: Four of them.
Person: Is at least one of them narrower than the one which I told you to pick up?
Computer: Yes, the red cube.

 

 
  [ # 1 ]

I’ve just updated the ChatScript page on SourceForge to reflect the new version, as well as the online documentation. Folks can visit http://chatscript.sourceforge.net/ for the latest. smile

 

 
  [ # 2 ]

That sounds great Bruce. Is there a sample or a demo of it in action?

 

 
  [ # 3 ]

Not as a total bot yet. I intend to sometime, but will have to be after the Loebner’s smile

 

 
  [ # 4 ]

Sounds good. As an off topic, will you be attending the Loebner Prize? It would be good to meet up.

 

 
  [ # 5 ]

Sounds cool! smile I’d also love to see a demo. Can you explain a little more what you mean by “plans”?

 

 
  [ # 6 ]

Steve:  sorry. can’t justify the expense.
CR: The manual is not extensive, it has some simple example of intent and code.
With an HTN planner you write scripts that determine elements of a plan. Let’s say you were building an AI to control a space fleet. It decides it wants a BIG spacecraft.  Small plans for that include how to make one from raw components (plan has to check availability, arrange for the elements to be transported to a manufacturing site). If no manufacturing site exists, the site plan might have to produce one.  Another small plan is to steal a ship from someone else.  A plan to acquire a particular mineral might mine it, get it from a stockpile, steal it, etc….  The planner’s job is to run through alternatives, finding one that works. If it gets a distance into generating a plan and finds a fatal roadblock, it has to unwind back to prior choice point and examine a different choice.

 

 
  [ # 7 ]

That example reminds me of the sort of algorithms used to create mazes, such as Depth-First Searching, or Breadth-First Searching. smile I know it’s not the same thing, but there are similar elements.

 

 
  [ # 8 ]

Hi, just talking about Planning?

Planning is a special AI “chapter”, not well known by all the academic nor the programmer’s world. I’ll explain a little.

The first project for planning was born after the scientist realize that computers cannot easily solve chained logic-problems, specially when there are restrictions and conditions which are not static or well known. SHRDLU was a initiative and a system aimed to solve this dilemma.

A typical planning task is playing chess, each “layout” is unique and requires a plan to succeed (or not).

A plan is a sequence of actions which are “legal” and to be “legal” those actions must have no restriction.

So let’s imagine a situation where you have a series of “variables” A, B, C.. and some logical-relations like this:
(A=1 and B>3) (A + B < 3), etc. Even your “state” (the sequence timing) is a Variable (like a program counter) so, the scenario is dynamic: each time you advance to a certain state, all the variables gets changed, and you might or not advance toward this new “state” (read as: combination of variable’s values, including the state counter)

A typical situation for this is the Hanoi Tower Challenge/Game you can start in each “turn” and “do a thing” which indeed changes the things and this ‘change"is conditioned by the “positions” of each ring in the 3 piles, and the size of each ring you might pick to move to another pile!

So, this seems easy.. but where is the trick?

Well, the problem lies on the impossibility of a brute-force solution, because normally the possible states upon each action are so high, mostly a combination, so the problem is NP-hard, thus unsolvable by brute-force attack.

¿is there a solution?
YES, there are many, most are based upon a classical backtracking attack, minimizing repetitive states, but this is not enough, so there have been clever-thinkers who solved the dilemma and proved that the solution was a solution, and not a guess-move thing. The first so called solution was named GraphPlan (google it) and there are more “derivatives” based upon a memorized back-planning schema.

The problem to solve indeed is similar to First Order Logic, but because all the successive “states” change the “logic” its hard to forge an “analytic-symbolic” move so the planning turned into elegant-shaped solutions and problems.

The application is immediate:

Logistic is the first usage, planning how to move merchant, how to load/unload a container’s ship (optimally), typical salesman problem, with many more constraints.
Robotics (planning movements with constrains, including a robot’s arms & position which is the main variable). Finally a new application is Natural Language Generation, because there is a huge possibility of picking up-sentences and grammar sub-constructs and the solution space is so huge, that a surface and often a deep planning turns necessary.

- that’s all, enjoy!

PD: Some links & documents on the fact are here!

en.wikipedia.org/wiki/Graphplan
http://www.cs.nott.ac.uk/~nza/G52PAS/lecture12.pdf
http://web.engr.oregonstate.edu/~afern/classes/cs533/notes/graphplan.pdf

 

 
  login or register to react