C++ AI Blog
Mind Supporters
Mindmaker
Supporters

AI Coding Steps
Index of
AI4U from
iUniverse.com

Forums
AGI Mailing List

AI Chat

AI Meetup Day

AI Poll: Results

CogNews

comp.lang.c++

KurzweilAI.net


Resources
AI C++ Source Code

AI FAQ: Software

AI Funding

BlogShares
Member Sites and
Others Linking To
Amazon AI4U
0595259227
Agents Portal
GameDev.net
GreatMindsWorking
Amazon AI4U
0595654371


C++ AI Parts

C++ Glossary

Concept-Fiber Theory of Mind

DMoz -- C++

FAQTs -- C++

Free Software Donation Directory

Genetic Daemon

JavaScript AI Mind

ManC++

Mind.Forth AI

NLP++ (tm)

Novamente

PAIR

PC AI -- C++

Player

Poor Man's AI Lab

RedPaper AI Lab

Standard Template Library

Standards in AI

Turing Machine

Variables in AI4U

VISLCG

VISLPSG


Weblogs Via
Technorati


Ahoyhoy.org ( q.v.)

AI Has Been Solved ( q.v.)

Eckel, Bruce ( q.v.)

               ________                ________          
              /        \              /        \         
             ( Motorium )   ______   ( Security )
    ________  \________/\  /      \  /\________/ _________
   /        \            \/  main  \/           /         \
  ( Volition )-----------(   Alife  )----------( Sensorium )
   \________/  ________  /\  loop  /\  _______  \_________/
              /        \/  \______/  \/       \
             (  Think   )            ( Emotion )
              \________/              \_______/
First implement the main Alife Mind loop at the core of the AI framework from
the AI textbook AI4U: Mind-1.1 Programmer's Manual with printable Index.

See also Ada - APL - C - COBOL - Forth - Java - JavaScript - Labview - Lisp -
Oberon - Perl - Prolog - Python - Ruby - Scheme - Smalltalk - Tcl - Visual Basic - XML.

Sun.7.SEP.2003 in the evolution of Do-It-Yourself Artificial Intelligence.

This weblog invites C++ programmers to implement the main Alife Mind loop of the simplest artificial intelligence.

Please put the resulting free AI source code on the Web to inspire other coders to flesh out the core of the AI with additional mind-modules.

There is no need to standardize or homogenize the evolution of the AI Minds in C++ or any other language. Let there be a wide diversity and diaspora of the evolving Minds in a classic scenario of the survival of the fittest.

An embedded systems engineer has roughed out the initial code.

AI.CPP

// Member function definitions of the AI class.
// For reference only                   9/3/03

#include <iomanip.h>

#include "AI.h"

   AI::AI()   // Constructor
   {
   // Use extensible Array class here
   // rather than fixed size array

   PsiAryPtr = new PsiStr[ARYSIZ];
   EnAryPtr  = new EnStr[ARYSIZ];
   AudAryPtr = new AudStr[ARYSIZ];
   }

   AI::~AI()  // Destructor
   {
   delete [] PsiAryPtr;
   delete [] EnAryPtr;
   delete [] AudAryPtr;
   }

// Member Functions

   // set functions
   // Templates to be used for data base functions

   BOOL AI::setEle( PsiStr *, const int );   // set concept array element
   BOOL AI::setEle( EnStr  *, const int );   // set english lexicon element, element index
   BOOL AI::setEle( AudStr *, const int );   // set auditory memory element, element index

   // get functions

   BOOL AI::getEle( const int, PsiStr * );   // return concept array element
   BOOL AI::getEle( const int, EnStr  * );   // return english lexicon element
   BOOL AI::getEle( const int, AudStr * );   // return auditory memory element

   // delete functions

   BOOL AI::delPsi( const int ); // delete concept array element, element index
   BOOL AI::delEn(  const int ); // delete english lexicon element, element index
   BOOL AI::delAud( const int ); // delete auditory memory element, element index

   // print functions

   BOOL AI::printPsiElements();  // output
   BOOL AI::printEnElements();   // output
   BOOL AI::printAudElements();  // output

   BOOL AI::setDefaults()
   {
   return (True);
   }

   // Functions below to be classes that are members of
   // the AI class rather than functions

   void AI::Security()  // Human input module with AI attention
   {
   }
   void AI::Sensorium() // AI Initial processing of Input
   {
   }
   void AI::Think       // AI Syntax and vocabulary of natural language
   {
   }
   void AI::Motorium()  // AI Output
   {
   }

   void AI::Alife()
   {
   setDefaults();
   while(True)
     {
     Security();  // Human input module with AI management
     Sensorium(); // AI Initial processing of Input
     Think();     // AI Syntax and vocabulary of natural language
     Motorium();  // AI Output
     };
   }


void main(void)
{
AI AI1;
AI1.Alife();
}
------------------------------------------------------------------
AI.H
// Declaration of the AI class.
// Member functions defined in AI.cpp

// preprocessor directives that
// prevent multiple inclusions of header file
#ifndef AI_H
#define AI_H

typedef int BOOL;

BOOL True = 1;
BOOL False = 0;

#define ARYSIZ 1024

class AI {

public:

   AI();
   ~AI();

   void Alife();


private:

typedef struct AudStrTag   // Auditory Memory Array
    {
    int pho;  // Phoneme
    int act;  // Activation Level
    int pov;  // Point of View
    int beg;  // Beginning
    int ctu;  // Continuation
    int psi;  // Tag number to a concept
    } AudStr;

typedef struct EnStrTag    // English Lexicon Array
    {
    int nen;  // English concept number
    int act;  // Activation Level
    int fex;  // Mindcore Exit tag
    int pos;  // Part of Speech
    int fin;  // Mindcore In tag
    int aud;  // Auditory Tag
    } EnStr;

typedef struct PsiStrTag   // Mindcore Concept Array
    {
    int psi;  // Mindcore concept number
    int act;  // Activation level
    int jux;  // Juxtaposed modifier
    int pre;  // Previous associated
    int pos;  // Part of Speech
    int seq;  // Subsequent tag
    int enx;  // Transfer to English
    } PsiStr;

    AudStr * AudStrPtr;
    EnStr  * EnStrPtr;
    PsiStr * PsiStrPtr;

    PsiStr * PsiAryPtr;
    EnStr  * EnAryPtr;
    AudStr * AudAryPtr;



   // set functions

   BOOL setEle( PsiStr *, const int );  // set concept array element, element index
   BOOL setEle( EnStr *, const int );  // set english lexicon element, element index
   BOOL setEle( AudStr *, const int ); // set auditory memory element, element index

   // get functions

   BOOL getEle( const int, PsiStr * );   // return concept array element
   BOOL getEle( const int, EnStr * );    // return english lexicon element
   BOOL getEle( const int, AudStr * );   // return auditory memory element

   // delete functions

   BOOL delPsi( const int ); // delete concept array element, element index
   BOOL delEn(  const int ); // delete english lexicon element, element index
   BOOL delAud( const int ); // delete auditory memory element, element index

   // print functions

   BOOL printPsiElements();  // output
   BOOL printEnElements();   // output
   BOOL printAudElements();  // output

   BOOL setDefaults();

   void Security();  // Human input module with AI attention
   void Sensorium(); // AI Initial processing of Input
   void Think();     // AI Syntax and vocabulary of natural language
   void Motorium();  // AI Output

};

#endif