||assign people and/or equipment to projects or events
Examples of multi-decision problems:
- navigating through streets, pipelines or networks
- assigning packages to couriers
- assigning people and equipment to projects
- staff scheduling
- scheduling steam-injection in a heavy-oil field
- exploring a decision-tree too large too search
The aipPandemonium class is used as a container-class for:
- sets, lists
- structure in one-to-many relationships
rrproj is free Open Source software that assigns people
and/or equipment to projects.
rrproj is a sample program in the aiParts distribution.
It uses the Requirement-Resource and High-Hope classes.
Sample scripts are provided for building and testing the
solver program. These scripts must be run from the
directory in which they reside.
A free Open Source graphical user-interface and
database are being developed using Open Office 3.
Your organization can develop an applications to use the
solver, or the solver can be integrated into other software.
The make script compiles and links a program that reads
and writes disk files. A better call interface is planned.
Status of the Software
aiParts is available for beta testing. The AI is still
The rrproj sample program needs much more testing.
The rrproj solver is slow. This will be improved.
Any C++ compiler should be able to compile this software.
In September 2008, aiParts 0.9.0 added many new features,
and the existing code was changed in many places.
See RELEASES.txt for details.
Most of the code has not changed since version 0.8.5 and
it has had a fair bit of testing with the sample programs.
The rrproj sample program has had a little testing, which
also tested the changes in the aiParts code.
There is much to be done to improve aiParts - see the
last section of this file.
Making the Sample Programs
Sample scripts are provided for building the sample
programs on Windows and Linux machines. They will
generally have to be modified for the particular
compiler (and possibly library) that you use.
See the files:
For the rrproj sample program, see these files in the
On Windows, the script is written to use the
Borland 5.5 C++ compiler and library. They are free,
high-quality and they are run from the command line.
On Unix/Linux systems, you might want to change g++
(which is good for Fedora) to gcc or cc or CC or
whatever command you use to run your compiler.
There are two approaches to using aiParts...
The first approach is to:
The second approach is to:
- Identify the most abstract layer of aiParts that is
appropriate for your problem and develop a set of
subclasses that specialize them for your problem.
- Write a program that assembles a problem from your
new classes and call the appropriate virtual
function(s) - like: yourDecision.decide() or
- Identify the sample program (or other software using
aiParts) that is closest to your problem, and take
a copy of the source files.
- Identify the classes that specialize the aiParts
software for the particular problem and incrementally
modify them to address your problem.
The second approach is easier because you learn how
the aiParts software works as you go, rather than having
to learn about it right from the start.
Support and Services
Suggestions for enhancements and changes are always welcome.
FAQ pages will be on the website in the future.
aiParts software is Open Source - you get the source code.
Anyone you want can support it, add to it, change it or
use it in other software.
Services are available by independent firms and developers.
These services are not endorsed by the aiParts project.
Setup, support, analysis and development services are
available by Brian Marshall, the developer of aiParts
and rrproj. Contact:
+1 403-651-0584 (and leave a message if necessary)
The High-Hope AI Technique
The High-Hope technique is used to find solutions to
problems in which a number of decisions have to be made
and each decision affects subsequent decisions.
The technique can be useful for many types of problems,
including arbitrarily constrained problems that have an
enormous number of possible solutions.
The technique is easy to implement in software, and easy
to specialize to solve a particular type of problem.
Software size and complexity grow very slowly with an
increase in the number of problem constraints.
For more information, see www.aiparts.org/highhope.htm
The High-Hope Technique...
- Given a problem, try to solve it repeatedly (physically
or by consideration) and remember the best solution(s).
- In a try, where there is a choice of which decision
to address next, choose the one that is most urgent -
either because it is particularly important or it is
- At each decision, pick the option with the most hope
for success. The hope of an option is the sum of
problem-domain-specific aspects plus strategic aspects.
- After each try, change the relevant strategic aspects
to reflect the result of the try.
The technique is chaotically sensitive to initial conditions,
parameters and the sequence of random numbers used for
choosing equal options. A tiny change can result in a
different choice in a try, which may affect subsequent
choices and tries.
Hope Combines Aspects
Hope is the result of the evaluation of all aspects being
considered. Option-hope is a single quantity that can be
used to compare options.
The hope associated with an option combines the results of
the evaluation of...
Static and dynamic aspects are particular to the problem
domain. For each aspect, you write a bit of code that
evaluates the aspect and assigns a goodness value.
- static aspects ("It's good for Bill to work evenings.)"
- dynamic aspects based on decisions made up to this point
("It would be bad for Sally to work today; she has already
worked five days in a row.")
- strategic aspects based on what has been learned in
previous tries ("This option worked really well last
The strategic aspects are handled by the High-Hope classes.
You create subclasses for the objects in your problem. An
application assembles a problem using these subclasses.
Fear, Greed and Curiosity
In the High-Hope technique, the strategic aspects are
emotions. The use of the word "emotion" and the names of
the emotions are misleading because the words have
multiple subtle meanings.
The strategic aspects that contribute to hope are:
Fear is the feeling that something bad may happen.
Fear causes you to avoid an option that has been a
problem in the past. Fear starts at Neutral and
becomes more negative as an option is involved in
Greed is the feeling that you know how to make
something good happen. Greed attracts you to options
that have worked well in the past. Greed starts at
Neutral and becomes more positive as an option is
involved in successful tries.
Curiosity is the feeling that an untried option might
be good. Curiosity attracts you to options that might
turn out even better than any you have already tried.
Curiosity about an apparently acceptable option starts
fairly high and decreases as the option is tried.
Hope = Fear + Greed + Curiosity
Hope is a Sum
A hope resolves to a goodness. Aspects that contribute to
a hope resolve to a goodnesses. Aspects can be combined by
adding, if goodnesses are implemented like...
The lack of symmetry around Neutral is a reflection of the
fact that the worse an aspect is, the more important it is.
There may be, for example, a variety of good aspects to
setting the alarm clock an hour later, but if one of them
is probably getting fired, it's probably a bad option.
aiParts Source Files
Files generally depend on the files above it in this list...
Low-Level Types, Base Class and Utility Classes:
||Time and date|
||base class, messages, random numbers|
Classes that implement AI Patterns:
||Emotion - Fear, Greed, Curiosity, Hope|
Classes for Decision-Making and Problem-Solving:
Classes that implement AI techniques:
Classes that specialize AI techniques:
Files for Sample Programs
||Using the date and time classes|
||Using the goodness class|
||Using the container class|
||Making decisions using an emotion|
||Navigating using the High-Hope classes|
The aiParts Open Source Project
aiParts is an Open Source project that develops software
parts that implement artificial intelligence.
The software distributed by this project is copyrighted by
its authors and then licensed with the MIT License and as
such, it is OSI Certified Open Source Software.
See the file LICENSE.txt.
This means that you can do pretty much whatever you want
with aiParts software... use it, distribute it, build it
into other software, whatever.
When you get aiParts software, you get the source code.
You have control of your software (regardless of what
this project does in the future).
Contributions are always welcome: software, documentation,
testing, suggestions, bug reports, enhancement requests,
comments and criticism. See the last section of this file.
aiParts is currently focused on the High-Hope technique
for multi-decision problems. Anyone is welcome to
contribute software parts that implement other approaches
to artificial intelligence.
For more information, contact Brian Marshall at:
See www.opensource.org for information on the
Open Source Initiative.
Future Development Notes
Make the A-to-B sample program problem bigger and harder.
Developing new AI techniques (alternatives to the High-Hope
Developing abstraction-layers for an AI technique (just as
the classes in aipReqRes.h/cpp specialize the High-Hope
technique for Requirement-Resource problems)
Recognize and support 'trivial' decisions to provide for:
aipTime.h/cpp: add seconds to class aipTimeOfDay
- better performance
- selecting a decision and choosing an option for a
resource (rather than for a requirement) and the
decision can be (set to be) trivial so the pre-chosen
will be chosen
There is much that can be done to improve the High-Hope AI:
- improve the choice of which decision to decide next
- improve the behavior in the exploring stage
- maybe add an initial feeling-out stage
- improve the refining stage
- analyze the output for sequences and cycles
- improve how the AI gets out of ruts
- further improvement of the way hope works
- and many other ways of refining the AI
Maybe: If a try fails, decisions and options later in the
solution get more fear than those earlier in the solution.
Good But Different
Recognize when a good result is significantly different from
other good results found.
Handling Good Improvements
After a recent try that was a good-improvement, increase
the curiosity of acceptable-looking options that look like
they would have a significant effect on the solution. A
"good-improvement" is a try that is better than the current
best-so-far try or acceptably good and significantly different
than the best-so-far try.
The problem itself could have a hope which affects how option
hopes are determined. The idea is that if problem-curiosity is
high, the aspects that control curiosity in options would be
given more weight. The same principle would apply to fear and
greed. This would 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 could be done with
problem-hope; when a node in the bsf solution is chosen,
drop problem-curiosity to (near) aipNeurtal.
A 'way' is a set of options chosen for a set of decisions.
Maybe, in a try, force some ways while exploring other ways.
Ways are a very rich abstraction - they can make it possible
to work on parts of a problem while keeping other parts
constant. Ways may be the key to recognizing similar solutions.