The AHA Model: Reference model R1 (HEDG2_04)
This is a large scale simulation model (under development) that implements
a general decision-making architecture in evolutionary agents. Each
agent is programmed as a whole virtual organism including the genome,
rudimentary physiology, the hormonal system, a cognitive architecture and
behavioural repertoire. They “live” in a stochastic spatially explicit
virtual environment with physical gradients, predators and prey. The primary
aim of the whole modelling machinery is to understand the evolution of
decision making mechanisms, personality, emotion and behavioural plasticity
within a realistic ecological framework. An object-oriented approach coupled
with a highly modular design not only allows to cope with increasing layers
of complexity inherent in such a model system but also provides a framework
for the system generalizability to a wide variety of systems. We also use
a “physical-machine-like” implementation philosophy and a coding standard
integrating the source code with parallel detailed documentation that
increases understandability, replicability and reusability of this model
system.
The cognitive architecture of the organism is based on a set of
motivational (emotional) systems that serves as a common currency for
decision making. Then, the decision making is based on predictive
assessment of external and internal stimuli as well as the agent’s own
motivational (emotional) state. The agent makes a subjective assessment
and selects, from the available repertoire, the behaviour that would reduce
the expected motivational (emotional) arousal. Thus, decision making is
based on predicting one’s own internal state. As such, the decision-making
architecture integrates motivation, emotion, and a very simplistic model
of consciousness.
The purpose of the AHA model is to investigate a general framework
for modelling proximate decision-making and behavior. From this we will
investigate adaptive goal-directed behaviour that is both guided by the
external environment and still is endogeneously generated.
Other research topics include individual differences, personality as well
as consequences of emotion and personality to population ecology.
We think that understanding and modelling complex adaptive behaviour requires
both extraneous (environmental) factors and stimuli as well as endogeneous
mechanisms that produce the behaviour. Explicit proximate representation
of the motivation and emotion systems, self-prediction can be an important
component in linking environment, genes, physiology, behavior, personality
and consciousness.
Fortran is used due to its simplicity and efficiency. For example, check out
this paper.
\dox
— contains pictures, plots and other resources for the full Doxygen\pfunit
— unit tests using pFUnit, so\tools
— various accessory tools, post-processing of the data generatedBuilding and running the mode is based on the GNU Make. Both the AHA Model
code and the HEDTOOLS (code or static library) are needed to build the
model. These two components of the AHA Model framework are described in the
Overview of the AHA Fortran modules.
Normally, the AHA Model code and the HEDTOOLS code are placed in two
subdirectories of the working directory using two separate commands to get the
code of the AHA Model and HEDTOOLS from the repositories (svn co https://...
or hg clone ssh://...
if Mercurial is used — check out
Subversion).
With the current main Subversion repository, getting the code requires these
commands:
svn co https://subversion.uib.no/repos/aha-fortran/tags/AHA_R/R1 AHA-R1
svn co https://subversion.uib.no/repos/aha-fortran/tags/HEDTOOLS/1.1 HEDTOOLS
or these, if Mercurial is used (here local folders are capital):
hg clone https://bitbucket.org/teg_uib/aha-r1 AHA-R1
hg clone ssh://hg@bitbucket.org/teg_uib/hedtools HEDTOOLS
or still these, if GitHub git-based repo is used:
git clone git@github.com:sbudaev/AHA-R1.git
git clone git@github.com:sbudaev/HEDTOOLS.git
Thus, the layout of the working directory after HEDG2_01
and HEDTOOLS
are
downloaded is like this:
workdir
|
|-- AHA-R1
| |-- dox
| |-- pfunit
| `-- tools
|
`-- HEDTOOLS
Building the AHA Model is done in the model directory (here HEDG2_01
). If
you use the terminal, go there with
cd AHA-R1
Here are the main commands to build and run the AHA Model:
make
;make run
;make distclean
;make help
.See Makefile for build
configuration. To get more information on the GNU Make see
AHA Modelling Tools Manual,
Using Microsoft Visual Studio and
Using Code::Blocks IDE.
The model makes use of several environment variables to control certain
global aspects of the execution. These variables have the AHA_
prefix
and are listed below.
AHA_DEBUG=TRUE
sets the “debug mode”;AHA_SCREEN=NO
sets logger to write to the standard output as wellAHA_DEBUG_PLOTS=YES
enables generation of debug plots;AHA_ZIP_FILES=YES
enables background compression of big output data files;AHA_CHECK_EXTERNALS=NO
disables checking for external executableMakefile to build the model
executable from the source code.
This is a standard GNU Make
Makefile to build the model from
the sources. It also automatically generates some platform and
compiler specific include files for the BASE_RANDOM
and the
IEEE math modules. See
Working with the model
section for details.
In addition to the GNU Make, this
Makefile also depends on thegrep
, cut
, sed
and awk
utilities that are installed on any
Unix/Linux system, but usually absent on Windows. For Windows
they can be obtained from several locations on the web, e.g.
Cygwin or GnuWin32. See
AHA Modelling Tools Manual
for more information.
gfortran
or Intelifort
.make run
starts a new batch task. Otherwise, the model.exe
suffix. By default, theMODEL.exe
for maximum portability.grep
command. Note that the outputDoxyfile
as:OUTPUT_DIRECTORY = ./model_docs
.BASE_STRINGS
in the list mustBASE_CSV_IO
because BASE_CSV_IO
depends onBASE_STRINGS
.del
or erase
. However, if Cygwin is used,rm
tool provided by Cygwin.The source code of the Makefile
contains many other parameters and is well documented throughout.