aiParts

Open Source Artificial Intelligence C++ Parts
Home
Contact
Releases
Download
Source Files
Modules
Read-Me
License
Your Application

aiParts README

This is the README.txt file that comes with the distribution...


=================================================================
aiParts                    README

aiParts is a set of C++ classes that implement artificial intelligence
techniques, plus some tiny sample programs.  Classes implement the
pandemonium and emotion AI Patterns, and the High-Hope technique.  A
"find the shortest path from A to B" sample program uses subclasses of
the High-Hope classes.

aiParts is primarily aimed at problems in which a number of decisions
must be made, each affecting the options available in subsequent 
decisions.  Examples include: navigating a car, playing chess, and 
assigning students to classes.

Project Home Page:   http://www.aiparts.org

This is Open Source software. Do whatever you want with it.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.  See the file LICENSE.txt.

This software is very generic C++; the idea is that any 
compiler should be able to compile it.

Questions, comments and contributions should be sent to 
Brian Marshall at bmarshal@agt.net

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
        Status of the AI

In aiParts 0.8.5...

The High-Hope technique, implemented in the samp_a_to_b
program, appears to be working fairly well. The question
now is how well the software will work with very-hard
problems - ones in which the solution space is much too 
large to be searched exhaustively.

The High-Hope classes can be improved by further 
experimenting and tuning.  They will be made more
sophisticated over time.  


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
        Using the High-Hope Classes

An application assembles a problem from objects which are
application-specific subclasses of the High-Hope classes.
The class aipHHProblem has a solve() function that might
be called directly, or called in a function in a subclass
of aipHHProblem.

The High-Hope technique wants to try many times.  Even
the most simple problem should get 50 tries.  In a fairly
easy problem, like samp_a_to_b, finding the best solution
might require 200 to 500 tries. In a very-hard problem, an
acceptable solution might be found in 2000 or 5000 tries.

It is normal for the High-Hope technique to sometimes
generate the same solution a number of times in a row.
It is like a chess player pondering a move and its
implications.

You can see the affects on fear, greed and curiosity
that are considered for each option in each decision
if you specify 2 for the samp_a_to_b logging parameter:
    samp_a_to_b  A  B  300 2 >samp_A_B.txt
This can produce a lot of output, so the output was
redirected to a file.

A tiny change in the software or the problem can result
in different choices in a try, and the result of this
try will affect subsequent tries.

Changing the number of tries will change various cutoff
values (ex. max tries without an improvement), and this
will change the series of solutions that are found.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
        aiParts Modules (identified by their header files)

Files depend on the files above it...

  Low-Level Types, Base Class and Utility Classes:
    aipGood.h          Goodness
    aipBase.h          base class, messages, logging

  Classes that implement AI Patterns:
    aipPandemonium.h   Pandemonium, demons
    aipEmotion.h       Emotion - Fear, Greed, Curiosity, Hope

  Classes for Decision-Making and Problem-Solving:
    aipDecision.h      Decisions, options
    aipProblem.h       Problems

  Classes that implement AI techniques:
    aipHighHope.h      High-Hope problem-solving


                  Files for Sample Programs
                                        samp_good.cpp
                                        samp_pandemonium.cpp
samp_deer_fear.h   samp_deer_fear.cpp   samp_decision.cpp
samp_a2b.h         samp_a2b.cpp         samp_a_to_b.cpp

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Making the Sample Programs

Linux/Unix shell scripts are provided to compile and link the
sample programs...

     mk_samp_good.sh        mk_samp_pandemonium.sh
     mk_samp_decision.sh    mk_samp_a_to_b.sh  

They may have to be edited to reflect what you call your
C++ compiler.  The scripts use g++ (good for Red Hat 9);
you might want to change it to gcc or cc or CC or something.


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Future Development Notes

Maybe: If a try fails, decisions and options later in the 
solution get more fear than those earlier in the solution.

  More like not starting from scratch
In decide(), after a recent try that was a good-improvement,
acceptable-looking options that look like they would have a 
significant effect on the solution have their curiosity bumped 
up.  After tries, iterate through decisions from last to first,
dropping the curiosity on options in the solution, but when
we have done this to a decision with another option with low
fear and high curiosity, stop the iteration.  The next try
will be the same up to this particular decision, the/an other
good option will be chosen and a different solution will be
found from there.  A "good-improvement" is a try that is 
better than the current best-so-far or (better than the
best-so-far-2nd and not the best-so-far).

  Improve tries_since_change
Set m_tries_since_change_count based on ways instead of
solution-goodness. A 'way' is defined by members of
decisions and options; it is distributed throughout the
problem.  May have to count decisions as they are addressed
so that decision order is remembered; a new type of
decision-iterator would iterate in decision-order.

  Try-Hope
The try itself should have a hope which is multiplied by hope 
used to make decisions.  The idea is that if Try-curiosity is 
high, the curiosity component of hopes being evaluated will be 
given more weight.  Same for fear and greed.  This would also 
allow for higher curiosity (and more exploration) early in the 
problem-solving, and lower curiosity (and more optimization)
later in the problem-solving.

  Finding Best Path When on New Path
If following a new path and come to the best-so-far path, 
keep following the bsf path.  This can be done with try-hope;
when a node in the bsf solution is chosen, drop try-curiosity
to (near) aipNeurtal.

Distinguish between a try that is changed and quite good
and a try that is changed and poor.

=================================================================