----------------------------------
How to use bp-ct (October 1999)
----------------------------------
This HOWTO is maintained by Pietro Terna, University of Torino,
Department of economics and finance, <terna@econ.unito.it>
bp-ct is a Swarm (version 1.3.1 or 1.4.1 or 2.0.1) code, handling
simple artificial neural networks, trained with the error
backpropagation (BP) technique. The code applies the Environment-
Rules-Agents (ERA) scheme and it is also capable of generating
automatically the neural network inputs and targets, mainly to
apply the Cross Target (CT) technique.
A general introduction to bp-ct, and to the ideas behind it (with
ERA and CT frameworks), is contained in: Terna, P. (1999),
Economic Experiments with Swarm: a Neural Network Approach to the
Self-Development of Consistency in Agents' Behavior, in F. Luna
and B. Stefansson (eds.), Economic Simulations in Swarm: Agent-
Based Modelling and Object Oriented Programming. Dordrecht and
London: Kluwer Academic.
------------------------
A few words introduction
------------------------
The CT method has the goal of building agents based upon
artificial neural networks (that self develop their rules while
acting and learning). Anyway, adopting the ERA scheme we can
interchange the techniques in an easy way, so we are planning for
the future to use Production Systems, Classifier Systems, Genetic
Algorithms.
With the ERA protocol, we use a specialized class of objects,
named RuleMaster, to manage the behavior of the agents. A
ruleMaster (ruleMaster = an instance of RuleMaster) receives all
the necessary data from each agent, which owns a dataWarehouse
object. To allow agent heterogeneity, we can have several
ruleMaster objects. To simplify the code design, the interaction
with the environment is allowed only to the agents. Another
specialized class of objects (the RuleMaker class) handles the
development of the rules.
The code allows us to use simultaneously any number of agents (an
agent = a neural network) and can be used: (i) as a simple BP
artificial neural networks training program; (ii) as a BP program
using internally generated inputs and targets, without a true CT
scheme or (iii) with the CT scheme.
The bp-ct code shows cases (i) and (ii); the companion ct-hayek
code is a true CT application, that shows the (iii) case.
----------------------
How to use the program
----------------------
-------------------------------------------------------------
(i) bp-ct as a BP artificial neural networks training program
(Subsection 6.1 of the paper quoted above)
-------------------------------------------------------------
In this case we must provide the files containing training and
verification data. In the bp-ct package we have, as an example, a
data.training file and a data.verification file, both containing
four lines with all the possible inputs and desired outputs
(targets) of an OrXor function, which uses as input two logical
values (0=F; 1=T) and as output the Or and the Xor logical
results. In this example the data set and the validation set are
exactly coincident, because we are limited to these four
possibilities, but normally we are employing a verification set
other than the training one (think, as an example, to the case of
time series forecasting with neural networks).
Using neural networks, if we apply in the output layer a
transformation function like the logistic, output and target
values must be mapped in the range 0-1 (or, better, 0.1-0.9, to
avoid the necessity of huge negative or positive inputs to the
function to obtain 0 or 1 as outputs); traditionally this is done
also for the input values, as a largely adopted convention
(mapping them in the range 0-1). In our package, this modification
from the external metrics to the internal one is done via a
minmax.data file - also needed in the cases (ii) and (iii) -
containing, in each row, four values: rows identify the inputs and
then the outputs-targets of the neural network function; the four
values in each row are the min and the max in the external metrics
and the min and max (normally 0-1 for the input lines and 0.1-0.9
for the output-target lines) in the internal one (see the example
in the package: two rows refer to inputs and have the 0 1 0 1
form; two refer to the outputs-targets and have the 0 1 0.1 0.9
form).
To begin using the program, run bp-ct and set the probes to
ModelSwarm and to ObserverSwarm (the two windows labeled
ModelSwarm and ObserverSwarm) in the following way:
ModelSwarm
useEO_EP 0
agentNumber 2
inputNodeNumber 2
hiddenNodeNumber 4
outputNodeNumber 2
patternNumberInVerificationSet 4
patternNumberInTrainingSet 4
epochNumberInEachTrainingCycle 100
epochGroups 0
agentsAreDisplayingData 0
readWeightsFromFile 0
ObserverSwarm
displayErrorGraphInVerificationSet 1
displayErrorGraphInTrainingSet 1
numberOfTheAgentA_ToBeObservedDirectly 1
stopAtEpochGroupNumber 10
Explanations:
NB if you change a value in a box displayed in a probe window,
remember to 'enter' it, by pressing the enter button on the
keyboard.
(a) useEO_EP can be used only in the (iii) case; see the paper
cited above to read about the use of this switch in the ct-hayek
companion code;
(b) agentNumber can be 1 or > 1; in our case we train
simultaneously two neural networks on the specific task of
approximating the OrXor function; being the initial parameters
(the weights, in the neural networks jargon) randomly chosen, the
results can be slightly different; the possibility of using
several agent/neural networks is mainly important in type (iii)
applications;
(c) inputNodeNumber, is here set to 2 as required by the OrXor
problem; we suggest not to use this setting interactively, but to
modify it in modelSwarm.m;
(d) hiddenNodeNumber, is here set to 4 to allow more flexibility
to the neural network (the choice of the right number of hidden
nodes is always a puzzle); the same suggestion presented above
applies here;
(e) outputNodeNumber, see (c);
(f) patternNumberInVerificationSet, is here set to 4, accordingly
to the data.verification file content;
(g) patternNumberInTrainingSet, is here set to 4, accordingly to
the data.training file content;
(h) epochNumberInEachTrainingCycle is the number of learning steps
for each cycle run of the program; an epoch is a learning run upon
the complete training set (with four patterns in our example);
choosing here epochNumberInEachTrainingCycle = 100 we obtain 100*4
training steps in each cycle (a cycle is reported as an Epoch
Group in the label of the X axis of the graphic windows);
(i) epochGroups is set by the program, to display the number of
epoch groups done until now;
(j) agentsAreDisplayingData, if set to 1 it produces a report on
the active window; set to 0 to avoid the report;
(k) readWeightsFromFile, if 1 the program reads previously
generated weights from files (see below); set to 0 to avoid
reading.
(l) displayErrorGraphInVerificationSet (0 = no; 1 = yes);
(m) displayErrorGraphInTrainingSet (0 = no; 1 = yes);
[The program generates two windows that report error measures, one
related to training data and the other related to verification
data; the errors reported are: (1) the conventional
backpropagation error (sum of the errors in all the output units
in all the patterns, i.e. epoch error, divided by the number of
patterns; this measure is also conventionally divided by 2),
labeled as Mean/Min/Max bp error; (2) the proportional error (this
error is the ratio obtained dividing the absolute value of the
difference between each target and each output by half the
difference between the max potential value and the min potential
value; this is a raw measure of the error as a proportion of half
the range of the output values; we have
没有合适的资源?快使用搜索试试~ 我知道了~
swarm经济仿真源代码.
共1082个文件
jpg:254个
gif:150个
m:139个
4星 · 超过85%的资源 需积分: 10 126 下载量 77 浏览量
2010-03-19
20:51:04
上传
评论
收藏 7.83MB RAR 举报
温馨提示
SWARM中的经济仿真: 基于智能体建模与面向对象设计的源代码,由于ebook大于15m目前无法上载!
资源推荐
资源详情
资源评论
收起资源包目录
swarm经济仿真源代码. (1082个子文件)
cleanDos.bat 65B
cleanDos.bat 50B
ModelSwarm.bin 2KB
ObserverSwarm.bin 2KB
Worker.bin 2KB
Firm.bin 1KB
BatchSwarm.bin 1KB
Output.bin 1024B
WorkerSpace.bin 896B
cleanUnix 55B
cleanUnix 46B
consumerMinmax.data 254B
producerMinmax.data 254B
minmax.data 40B
arborgamesa.gif 1.06MB
390dynamic.gif 1.02MB
vila.gif 342KB
320arborgamese.gif 316KB
310heatbugs.gif 292KB
3b0turmite.gif 183KB
3b0turmite.gif 183KB
320arborgamesg.gif 162KB
shiguan2.gif 116KB
360bankemer.gif 110KB
无标题.gif 110KB
arborgamesb.gif 110KB
360bankactive.gif 106KB
340sss.gif 89KB
320species.gif 76KB
360banklink.gif 74KB
320population.gif 71KB
330asmb.gif 69KB
marketb8.gif 69KB
marketb9.gif 69KB
biaoti2.gif 68KB
tipsybugs.gif 56KB
mousetrapworld.gif 49KB
marketa.gif 49KB
370marketb.gif 48KB
390dynamica.gif 47KB
350antsort.gif 47KB
330asmc.gif 46KB
sss0.gif 45KB
book.gif 40KB
370marketa.gif 36KB
3a0tipsybug.gif 34KB
feresta.gif 32KB
330asmd.gif 31KB
320arborgamef.gif 24KB
sss1.gif 15KB
lianjie19.gif 13KB
lianjie11.gif 11KB
predictors.gif 11KB
mybook.gif 8KB
mousetrapschedule.gif 8KB
mousetraptyigger.gif 8KB
lianjie14.gif 8KB
lianjie15.gif 8KB
lianjie13.gif 7KB
lianjie12.gif 7KB
JASSSMed.gif 7KB
JASSSMed.gif 7KB
lianjie22.gif 6KB
lianjie20.gif 6KB
fzpt-32.gif 5KB
lianjie17.gif 5KB
关闭窗口.gif 4KB
关闭窗口1.gif 4KB
演示1.gif 3KB
演示.gif 3KB
li-130.gif 2KB
bar.gif 2KB
bar.gif 2KB
lianjie21.gif 2KB
002.gif 2KB
001.gif 2KB
XYD1.GIF 2KB
XYD2.GIF 2KB
007.gif 2KB
007.gif 2KB
007.gif 2KB
ren01.gif 2KB
line2.gif 2KB
006.gif 1KB
006.gif 1KB
line3.gif 1KB
ren06.gif 1KB
biaoshi.gif 1KB
shou1.gif 1KB
compressed.gif 1KB
line1.gif 600B
007.gif 581B
jt03.gif 549B
006.gif 467B
jt04.gif 458B
zhi.gif 430B
320arborgamef.gif 423B
360bankactive.gif 414B
space.gif 405B
320arborgamese.gif 401B
共 1082 条
- 1
- 2
- 3
- 4
- 5
- 6
- 11
frestone2010
- 粉丝: 13
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页