Author image Christophe IVORRA
and 1 contributors


Chorus::Expert - A simple skeleton of application using one or more Chorus::Engine objects (inference engines) working together on a common task.


Version 1.04


Chorus::Expert does 3 simple things :

  1 - Registers one or more Chorus::Engine objects
  2 - Provides to each of them a shared working area ($SELF->BOARD)
  3 - Enter an infinite loop on each inference engine until one of them declares the system as SOLVED.

   package A;
   use Chorus::Engine;
   our $agent = Chorus::Engine->new();

   # --
   package B;
   use Chorus::Engine;
   our $agent = Chorus::Engine->new();
   # --
   use Chorus::Expert;
   use A;
   use B;
   my $xprt = Chorus::Expert->new();



   use Chorus::Expert;
   use Chorus::Engine;
   my $xprt = Chorus::Expert->new();

   my $e1 = Chorus::Engine->new();    # inference engine 1
   my $e2 = Chorus::Engine->new();    # inference engine 2

   $xprt->register($e1,$e2);          # $e1 and $2 added to the list of agents
                                      # providing to all of them a shared attribute named BOARD


   Tells the Chorus::Expert object to enter in an infinite loop until one of the engines 
   set the attribute $SELF->BOARD->{SOLVED} to something true. 
   The Chorus::Expert object will ask its agents, one after one, to test all its rules with all
   possible combinations of its _SCOPE attributes. An agent never ends while at least one of its rules 
   returns a true value in the same loop (see Chorus::Engine documentation).  
   $xprt->process();            # without argument
   $xprt->process($something);  # this argument will become $SELF->BOARD->INPUT for all agents


Christophe Ivorra, <ch.ivorra at>


Please report any bugs or feature requests to bug-chorus-expert at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

    perldoc Chorus::Expert

You can also look for information at:



Copyright 2013 Christophe Ivorra.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See for more information.