aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a02929.html
blob: 4d2d68dc8d29593c1074ee1681ff13ef8acd29b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>NeL: NLAINIMAT::CMHiCSbase class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex">  <form class="search" action="search.php" method="get">
<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a>  | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>NLAINIMAT::CMHiCSbase Class Reference</h1><code>#include &lt;<a class="el" href="a06033.html">mhics.h</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A Modular Hierarchical Classifier System. This is the base component where all rules are stored. <dl compact><dt><b>Author:</b></dt><dd>Gabriel ROBERT <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2002 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="a06033.html#l00122">122</a> of file <a class="el" href="a06033.html">mhics.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea0">addActionCS</a> (const <a class="el" href="a02158.html">CActionClassifiers</a> &amp;action)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a new action in the net.  <a href="#NLAINIMAT_1_1CMHiCSbasea0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea1">addVirtualActionCS</a> (const <a class="el" href="a02158.html">CActionClassifiers</a> &amp;action)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea2">CMHiCSbase</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea3">dbgPrintClassifierPriorityInFile</a> (std::string fileName) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea4">dividePriorityByTheMinPriorityPartInAMotivation</a> (<a class="el" href="a05371.html#a99">TMotivation</a> motivationName)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05371.html#a101">TAction</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea5">getActionPart</a> (<a class="el" href="a05371.html#a99">TMotivation</a> motivationName, <a class="el" href="a05371.html#a7">TClassifierNumber</a> classifierNumber) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea6">getDebugString</a> (std::string &amp;<a class="el" href="a04223.html#a627">t</a>) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Chaine de debug.  <a href="#NLAINIMAT_1_1CMHiCSbasea6"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02342.html">CClassifierPriority</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea7">getPriorityPart</a> (<a class="el" href="a05371.html#a99">TMotivation</a> motivationName, <a class="el" href="a05371.html#a7">TClassifierNumber</a> classifierNumber) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea8">isAnAction</a> (<a class="el" href="a05371.html#a101">TAction</a> behav) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">To now if a behav selected by a CS is an action (if not, it's a common CS).  <a href="#NLAINIMAT_1_1CMHiCSbasea8"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea9">learningUpdatePriorityValueClassifierTime</a> (<a class="el" href="a05371.html#a99">TMotivation</a> motivationName, <a class="el" href="a05371.html#a7">TClassifierNumber</a> classifierNumber, <a class="el" href="a04558.html#a11">uint32</a> time)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea10">learningUpdatePriorityValueTimeToSuccess</a> (<a class="el" href="a05371.html#a99">TMotivation</a> motivationName, <a class="el" href="a05371.html#a7">TClassifierNumber</a> classifierNumber, <a class="el" href="a04558.html#a11">uint32</a> timeToSuccess)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Update a priority value in learning mode.  <a href="#NLAINIMAT_1_1CMHiCSbasea10"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea11">loadClassifierFromFile</a> (std::string fileName)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Load classifiers from a file. Return false if thereis a probleme.  <a href="#NLAINIMAT_1_1CMHiCSbasea11"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea12">printDebugString</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea13">selectBehavior</a> (<a class="el" href="a05371.html#a99">TMotivation</a> motivationName, const <a class="el" href="a02422.html">CCSPerception</a> *psensorMap, std::multimap&lt; <a class="el" href="a02342.html">CClassifierPriority</a>, std::pair&lt; <a class="el" href="a05371.html#a7">TClassifierNumber</a>, <a class="el" href="a05371.html#a13">TTargetId</a> &gt; &gt; &amp;mapActivableCS)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea14">setPriorityValue</a> (<a class="el" href="a05371.html#a99">TMotivation</a> motivationName, <a class="el" href="a05371.html#a7">TClassifierNumber</a> classifierNumber, <a class="el" href="a02342.html">CClassifierPriority</a> priority)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set a new value for a classifier priority.  <a href="#NLAINIMAT_1_1CMHiCSbasea14"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea15">~CMHiCSbase</a> ()</td></tr>

<tr><td colspan=2><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02159.html">CActionResources</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbaseo0">pActionResources</a></td></tr>

<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::set&lt; <a class="el" href="a05371.html#a101">TAction</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser0">_ActionSet</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::map&lt; <a class="el" href="a05371.html#a99">TMotivation</a>, <a class="el" href="a02343.html">CClassifierSystem</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::map&lt; <a class="el" href="a05371.html#a101">TAction</a>, <a class="el" href="a02343.html">CClassifierSystem</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser2">_VirtualActionClassifierSystems</a></td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea2" doxytag="NLAINIMAT::CMHiCSbase::CMHiCSbase" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> NLAINIMAT::CMHiCSbase::CMHiCSbase </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06032.html#l00212">212</a> of file <a class="el" href="a06032.html">mhics.cpp</a>.
<p>
References <a class="el" href="a06033.html#l00185">pActionResources</a>.
<p>
<div class="fragment"><pre>00213 {
00214         <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaseo0">pActionResources</a> = <span class="keyword">new</span> CActionResources();
00215 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea15" doxytag="NLAINIMAT::CMHiCSbase::~CMHiCSbase" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> NLAINIMAT::CMHiCSbase::~<a class="el" href="a02929.html">CMHiCSbase</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06032.html#l00217">217</a> of file <a class="el" href="a06032.html">mhics.cpp</a>.
<p>
References <a class="el" href="a06033.html#l00185">pActionResources</a>.
<p>
<div class="fragment"><pre>00218 {
00219         <span class="keyword">delete</span> <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaseo0">pActionResources</a>;
00220 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea0" doxytag="NLAINIMAT::CMHiCSbase::addActionCS" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NLAINIMAT::CMHiCSbase::addActionCS </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a02158.html">CActionClassifiers</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>action</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Add a new action in the net. 
<p>

<p>
Definition at line <a class="el" href="a06032.html#l00249">249</a> of file <a class="el" href="a06032.html">mhics.cpp</a>.
<p>
References <a class="el" href="a06033.html#l00190">_ActionSet</a>, <a class="el" href="a05371.html#a101a75">NLAINIMAT::Action_VIRTUAL_ACTIONS</a>, <a class="el" href="a06032.html#l00222">addVirtualActionCS()</a>, <a class="el" href="a05551.html#l00694">NLAINIMAT::CActionClassifiers::getName()</a>, and <a class="el" href="a05622.html#l00290">nlassert</a>.
<p>
Referenced by <a class="el" href="a06032.html#l00391">loadClassifierFromFile()</a>.
<p>
<div class="fragment"><pre>00250 {
00251         <a class="code" href="a04199.html#a6">nlassert</a> ( action.getName() &lt; <a class="code" href="a05371.html#a101a75">Action_VIRTUAL_ACTIONS</a>);
00252         <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea1">addVirtualActionCS</a>(action);
00253         <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser0">_ActionSet</a>.insert(action.getName());
00254 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea1" doxytag="NLAINIMAT::CMHiCSbase::addVirtualActionCS" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NLAINIMAT::CMHiCSbase::addVirtualActionCS </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a02158.html">CActionClassifiers</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>action</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Add a new virtual action in the net. A virtual action is an action without operator wich is also a motivation. Exemple : Figthing is a virtual action. It may satisfy the anger motivation and is a motivation for guive a sword slash.
<p>
Definition at line <a class="el" href="a06032.html#l00222">222</a> of file <a class="el" href="a06032.html">mhics.cpp</a>.
<p>
References <a class="el" href="a06033.html#l00188">_MotivationClassifierSystems</a>, <a class="el" href="a06033.html#l00189">_VirtualActionClassifierSystems</a>, <a class="el" href="a05551.html#l00128">NLAINIMAT::CClassifierSystem::addClassifierSystem()</a>, <a class="el" href="a05551.html#l00715">NLAINIMAT::CActionClassifiers::getClassifiersByMotivationMap()</a>, <a class="el" href="a05551.html#l00719">NLAINIMAT::CActionClassifiers::getClassifiersByVirtualActionMap()</a>, <a class="el" href="a06363.html#l00185">NLAINIMAT::TAction</a>, and <a class="el" href="a06363.html#l00045">NLAINIMAT::TMotivation</a>.
<p>
Referenced by <a class="el" href="a06032.html#l00249">addActionCS()</a>, and <a class="el" href="a06032.html#l00391">loadClassifierFromFile()</a>.
<p>
<div class="fragment"><pre>00223 {
00224         <span class="keyword">const</span> std::map&lt;TMotivation, CClassifierSystem&gt; *mapActionByMotivation = action.getClassifiersByMotivationMap();
00225         std::map&lt;TMotivation, CClassifierSystem&gt;::const_iterator ItMapActionByMotivation;
00226         <span class="keywordflow">for</span> (ItMapActionByMotivation = mapActionByMotivation-&gt;begin(); ItMapActionByMotivation != mapActionByMotivation-&gt;end(); ItMapActionByMotivation++)
00227         {
00228                 CClassifierSystem* pCS;
00229                 <a class="code" href="a05371.html#a99">TMotivation</a> motivationName = (*ItMapActionByMotivation).first;
00230                 <span class="keyword">const</span> CClassifierSystem* pOtherCS = &amp;((*ItMapActionByMotivation).second);
00231 
00232                 pCS = &amp;(<a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>[motivationName]);
00233                 pCS-&gt;addClassifierSystem(*pOtherCS);
00234         }
00235 
00236         <span class="keyword">const</span> std::map&lt;TAction, CClassifierSystem&gt; *mapActionByVirtualAction = action.getClassifiersByVirtualActionMap();
00237         std::map&lt;TAction, CClassifierSystem&gt;::const_iterator ItMapActionByVirtualAction;
00238         <span class="keywordflow">for</span> (ItMapActionByVirtualAction = mapActionByVirtualAction-&gt;begin(); ItMapActionByVirtualAction != mapActionByVirtualAction-&gt;end(); ItMapActionByVirtualAction++)
00239         {
00240                 CClassifierSystem* pCS;
00241                 <a class="code" href="a05371.html#a101">TAction</a> virtualActionName = (*ItMapActionByVirtualAction).first;
00242                 <span class="keyword">const</span> CClassifierSystem* pOtherCS = &amp;((*ItMapActionByVirtualAction).second);
00243 
00244                 pCS = &amp;(<a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser2">_VirtualActionClassifierSystems</a>[virtualActionName]);
00245                 pCS-&gt;addClassifierSystem(*pOtherCS);
00246         }
00247 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea3" doxytag="NLAINIMAT::CMHiCSbase::dbgPrintClassifierPriorityInFile" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NLAINIMAT::CMHiCSbase::dbgPrintClassifierPriorityInFile </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">std::string&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>fileName</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06032.html#l00531">531</a> of file <a class="el" href="a06032.html">mhics.cpp</a>.
<p>
References <a class="el" href="a06033.html#l00188">_MotivationClassifierSystems</a>, <a class="el" href="a05708.html#l00531">NLMISC::COFile::close()</a>, <a class="el" href="a05708.html#l00255">NLMISC::CIFile::close()</a>, <a class="el" href="a05551.html#l00054">NLAINIMAT::CClassifierPriority::getClassifierTimer()</a>, <a class="el" href="a05551.html#l00044">NLAINIMAT::CClassifierPriority::getPriority()</a>, <a class="el" href="a06032.html#l00303">getPriorityPart()</a>, <a class="el" href="a05551.html#l00049">NLAINIMAT::CClassifierPriority::getPriorityTimer()</a>, <a class="el" href="a05646.html#l00235">len</a>, <a class="el" href="a05708.html#l00503">NLMISC::COFile::open()</a>, <a class="el" href="a05708.html#l00135">NLMISC::CIFile::open()</a>, <a class="el" href="a05708.html#l00571">NLMISC::COFile::serialBuffer()</a>, <a class="el" href="a06363.html#l00045">NLAINIMAT::TMotivation</a>, <a class="el" href="a06229.html#l02652">NLMISC::toString()</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
<div class="fragment"><pre>00532 {
00533         <span class="keywordtype">int</span> i;
00534         std::map&lt;TMotivation, CClassifierSystem&gt;::const_iterator itMotivationClassifierSystems;
00535         std::string nomDuFichier = <span class="stringliteral">"D:\\jgab\\doc\\IA\\_These\\gnuplot\\TFC\\"</span>;
00536         nomDuFichier += fileName;
00537         
00538         <a class="code" href="a02653.html">NLMISC::CIFile</a> baltazar;
00539         <span class="keywordtype">bool</span> yaqqunauboutdufil = baltazar.<a class="code" href="a02653.html#NLMISC_1_1CIFilea12">open</a>(nomDuFichier.c_str(), <span class="keyword">true</span>);
00540         baltazar.<a class="code" href="a02653.html#NLMISC_1_1CIFilea3">close</a>();
00541         
00542         <a class="code" href="a03011.html">NLMISC::COFile</a> melkior;
00543         std::string ohlabellephrase = <span class="stringliteral">""</span>;
00544         
00545         <span class="keywordflow">if</span> (!yaqqunauboutdufil)
00546         {
00547                 melkior.<a class="code" href="a03011.html#NLMISC_1_1COFilea9">open</a>(nomDuFichier.c_str(), <span class="keyword">false</span>, <span class="keyword">true</span>);
00548                 
00549                 <span class="keywordflow">for</span>(itMotivationClassifierSystems  = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.begin();
00550                         itMotivationClassifierSystems != <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.end();
00551                         itMotivationClassifierSystems++)
00552                 {
00553                         <a class="code" href="a05371.html#a99">TMotivation</a> laMotive = (*itMotivationClassifierSystems).first;
00554                         <span class="keywordflow">for</span> (i= 0; i&lt; (*itMotivationClassifierSystems).second.getClassifierNumber(); i++)
00555                         {
00556                                 ohlabellephrase += <span class="stringliteral">"MAX "</span>;
00557                                 ohlabellephrase += NLAINIMAT::conversionMotivation.toString(laMotive);
00558                                 ohlabellephrase += <span class="stringliteral">" "</span>;
00559                                 (*itMotivationClassifierSystems).second.getDebugString(i,ohlabellephrase);
00560                                 ohlabellephrase += <span class="stringliteral">";T2S "</span>;
00561                                 ohlabellephrase += NLAINIMAT::conversionMotivation.toString(laMotive);
00562                                 ohlabellephrase += <span class="stringliteral">" "</span>;
00563                                 (*itMotivationClassifierSystems).second.getDebugString(i,ohlabellephrase);
00564                                 ohlabellephrase += <span class="stringliteral">";ExT "</span>;
00565                                 ohlabellephrase += NLAINIMAT::conversionMotivation.toString(laMotive);
00566                                 ohlabellephrase += <span class="stringliteral">" "</span>;
00567                                 (*itMotivationClassifierSystems).second.getDebugString(i,ohlabellephrase);
00568                                 <span class="comment">//                              ohlabellephrase += NLMISC::toString(i);</span>
00569                                 
00570                                 ohlabellephrase += <span class="stringliteral">";"</span>;
00571                         }
00572                 }
00573                 ohlabellephrase += <span class="stringliteral">"\n"</span>;
00574         }
00575         <span class="keywordflow">else</span>
00576         {
00577                 melkior.<a class="code" href="a03011.html#NLMISC_1_1COFilea9">open</a>(nomDuFichier.c_str(), <span class="keyword">true</span>, <span class="keyword">true</span>);
00578         }
00579 
00580         <span class="keywordflow">for</span>(itMotivationClassifierSystems  = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.begin();
00581                 itMotivationClassifierSystems != <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.end();
00582                 itMotivationClassifierSystems++)
00583         {
00584                 <a class="code" href="a05371.html#a99">TMotivation</a> laMotive = (*itMotivationClassifierSystems).first;
00585                 <span class="keywordflow">for</span> (i= 0; i&lt; (*itMotivationClassifierSystems).second.getClassifierNumber(); i++)
00586                 {
00587                         CClassifierPriority laSuperPrio = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea7">getPriorityPart</a>(laMotive, i);
00588                         ohlabellephrase += <a class="code" href="a05378.html#a244">NLMISC::toString</a>(laSuperPrio.getPriority());
00589                         ohlabellephrase += <span class="stringliteral">";"</span>;
00590                         ohlabellephrase += <a class="code" href="a05378.html#a244">NLMISC::toString</a>(laSuperPrio.getPriorityTimer());
00591                         ohlabellephrase += <span class="stringliteral">";"</span>;
00592                         ohlabellephrase += <a class="code" href="a05378.html#a244">NLMISC::toString</a>(laSuperPrio.getClassifierTimer());
00593                         ohlabellephrase += <span class="stringliteral">";"</span>;
00594                 }
00595         }
00596         ohlabellephrase += <span class="stringliteral">"\n"</span>;
00597         
00598         
00599         <a class="code" href="a04558.html#a7">uint8</a> *buf = (<a class="code" href="a04558.html#a7">uint8</a> *)ohlabellephrase.c_str();
00600         <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a571">len</a> = ohlabellephrase.length();
00601         melkior.<a class="code" href="a03011.html#NLMISC_1_1COFilea12">serialBuffer</a>(buf,len);
00602         melkior.<a class="code" href="a03011.html#NLMISC_1_1COFilea0">close</a>();
00603 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea4" doxytag="NLAINIMAT::CMHiCSbase::dividePriorityByTheMinPriorityPartInAMotivation" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NLAINIMAT::CMHiCSbase::dividePriorityByTheMinPriorityPartInAMotivation </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a05371.html#a99">TMotivation</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>motivationName</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea5" doxytag="NLAINIMAT::CMHiCSbase::getActionPart" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a05371.html#a101">TAction</a> NLAINIMAT::CMHiCSbase::getActionPart </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a05371.html#a99">TMotivation</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>motivationName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a05371.html#a7">TClassifierNumber</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>classifierNumber</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Give the action part of a given Classifier. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>motivationName</em>&nbsp;</td><td>is the name of the CS </td></tr>
    <tr><td valign=top><em>classifierNumber</em>&nbsp;</td><td>is the number of the classifier. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>is the condition part of the wanted Classifier.</dd></dl>

<p>
Definition at line <a class="el" href="a06032.html#l00285">285</a> of file <a class="el" href="a06032.html">mhics.cpp</a>.
<p>
References <a class="el" href="a06033.html#l00188">_MotivationClassifierSystems</a>, <a class="el" href="a05371.html#a101a56">NLAINIMAT::Action_DoNothing</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06363.html#l00185">NLAINIMAT::TAction</a>, and <a class="el" href="a05552.html#l00064">NLAINIMAT::TClassifierNumber</a>.
<p>
Referenced by <a class="el" href="a06032.html#l00982">NLAINIMAT::CMHiCSagent::motivationCompute()</a>.
<p>
<div class="fragment"><pre>00286 {
00287         <span class="keywordflow">if</span> (classifierNumber == -1) <span class="keywordflow">return</span> <a class="code" href="a05371.html#a101a56">Action_DoNothing</a>;
00288 
00289         std::map&lt;TMotivation, CClassifierSystem&gt;::const_iterator itMotivationClassifierSystems = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.find(motivationName);
00290         <a class="code" href="a04199.html#a6">nlassert</a>(itMotivationClassifierSystems != <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.end());
00291         <span class="keywordflow">return</span> (*itMotivationClassifierSystems).second.getActionPart(classifierNumber);
00292 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea6" doxytag="NLAINIMAT::CMHiCSbase::getDebugString" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NLAINIMAT::CMHiCSbase::getDebugString </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>t</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Chaine de debug. 
<p>

<p>
Definition at line <a class="el" href="a06032.html#l00334">334</a> of file <a class="el" href="a06032.html">mhics.cpp</a>.
<p>
References <a class="el" href="a06033.html#l00190">_ActionSet</a>, <a class="el" href="a06033.html#l00188">_MotivationClassifierSystems</a>, <a class="el" href="a06033.html#l00189">_VirtualActionClassifierSystems</a>, and <a class="el" href="a05646.html#l00985">t</a>.
<p>
<div class="fragment"><pre>00335 {
00336         std::string ret = <span class="stringliteral">"\n---------------------------"</span>;
00337         std::map&lt;TMotivation, CClassifierSystem&gt;::const_iterator itMotivationClassifierSystems;
00338         <span class="keywordflow">for</span> (itMotivationClassifierSystems = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.begin(); itMotivationClassifierSystems != <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.end(); itMotivationClassifierSystems++)
00339         {
00340                 ret += <span class="stringliteral">"\nMotivation : "</span> + conversionMotivation.toString((*itMotivationClassifierSystems).first);
00341                 (*itMotivationClassifierSystems).second.getDebugString(ret);
00342         }
00343         std::map&lt;TAction, CClassifierSystem&gt;::const_iterator itVirtualActionClassifierSystems;
00344         <span class="keywordflow">for</span> (itVirtualActionClassifierSystems = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser2">_VirtualActionClassifierSystems</a>.begin(); itVirtualActionClassifierSystems != <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser2">_VirtualActionClassifierSystems</a>.end(); itVirtualActionClassifierSystems++)
00345         {
00346                 ret += <span class="stringliteral">"\nVirtual Action : "</span> + conversionAction.toString((*itVirtualActionClassifierSystems).first);
00347                 (*itVirtualActionClassifierSystems).second.getDebugString(ret);
00348         }
00349         ret += <span class="stringliteral">"\nACTIONS :\n"</span>;
00350         std::set&lt;TAction&gt;::const_iterator itActionSet;
00351         <span class="keywordflow">for</span> (itActionSet = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser0">_ActionSet</a>.begin(); itActionSet != <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser0">_ActionSet</a>.end(); itActionSet++)
00352         {
00353                 ret += conversionAction.toString((*itActionSet)) + <span class="stringliteral">"\n"</span>;
00354         }
00355         <a class="code" href="a04223.html#a627">t</a>+=ret;
00356 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea7" doxytag="NLAINIMAT::CMHiCSbase::getPriorityPart" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a02342.html">CClassifierPriority</a> NLAINIMAT::CMHiCSbase::getPriorityPart </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a05371.html#a99">TMotivation</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>motivationName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a05371.html#a7">TClassifierNumber</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>classifierNumber</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06032.html#l00303">303</a> of file <a class="el" href="a06032.html">mhics.cpp</a>.
<p>
References <a class="el" href="a06033.html#l00188">_MotivationClassifierSystems</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05552.html#l00064">NLAINIMAT::TClassifierNumber</a>.
<p>
Referenced by <a class="el" href="a06032.html#l00095">NLAINIMAT::CMotivationEnergy::computeMotivationValue()</a>, and <a class="el" href="a06032.html#l00531">dbgPrintClassifierPriorityInFile()</a>.
<p>
<div class="fragment"><pre>00304 {
00305         <span class="keywordflow">if</span> (classifierNumber == -1) <span class="keywordflow">return</span> CClassifierPriority();
00306         
00307         std::map&lt;TMotivation, CClassifierSystem&gt;::const_iterator itMotivationClassifierSystems = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.find(motivationName);
00308         <a class="code" href="a04199.html#a6">nlassert</a>(itMotivationClassifierSystems != <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.end());
00309         <span class="keywordflow">return</span> (*itMotivationClassifierSystems).second.getPriorityPart(classifierNumber);
00310 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea8" doxytag="NLAINIMAT::CMHiCSbase::isAnAction" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool NLAINIMAT::CMHiCSbase::isAnAction </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a05371.html#a101">TAction</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>behav</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
To now if a behav selected by a CS is an action (if not, it's a common CS). 
<p>

<p>
Definition at line <a class="el" href="a06032.html#l00327">327</a> of file <a class="el" href="a06032.html">mhics.cpp</a>.
<p>
References <a class="el" href="a06033.html#l00190">_ActionSet</a>.
<p>
<div class="fragment"><pre>00328 {
00329         std::set&lt;TAction&gt;::const_iterator itActionSet = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser0">_ActionSet</a>.find(behav);
00330         <span class="keywordflow">return</span> (itActionSet != <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser0">_ActionSet</a>.end());
00331 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea9" doxytag="NLAINIMAT::CMHiCSbase::learningUpdatePriorityValueClassifierTime" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NLAINIMAT::CMHiCSbase::learningUpdatePriorityValueClassifierTime </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a05371.html#a99">TMotivation</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>motivationName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a05371.html#a7">TClassifierNumber</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>classifierNumber</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>time</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06032.html#l00634">634</a> of file <a class="el" href="a06032.html">mhics.cpp</a>.
<p>
References <a class="el" href="a06033.html#l00188">_MotivationClassifierSystems</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05551.html#l00064">NLAINIMAT::CClassifierPriority::SetClassifierTimer()</a>, <a class="el" href="a05551.html#l00059">NLAINIMAT::CClassifierPriority::setPriorityTimer()</a>, <a class="el" href="a05552.html#l00064">NLAINIMAT::TClassifierNumber</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
Referenced by <a class="el" href="a06032.html#l01219">NLAINIMAT::CMHiCSagent::learningComputation()</a>.
<p>
<div class="fragment"><pre>00635 {
00636         <span class="comment">// Le but est de faire une moyenne sur les valeurs de fitness. Pour �a on fait une moyenne sur les 10 pas de temps pr�c�dents.</span>
00637         std::map&lt;TMotivation, CClassifierSystem&gt;::iterator itMotivationClassifierSystems = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.find(motivationName);
00638         <a class="code" href="a04199.html#a6">nlassert</a>(itMotivationClassifierSystems != <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.end());
00639         <a class="code" href="a04558.html#a11">uint32</a> oldTime = (*itMotivationClassifierSystems).second.getPriorityPart(classifierNumber).getClassifierTimer();
00640         <a class="code" href="a04558.html#a11">uint32</a> newTime;
00641         <span class="keywordflow">if</span> (oldTime == 0)
00642         {
00643                 newTime = time;
00644         }
00645         <span class="keywordflow">else</span>
00646         {
00647                 <span class="keywordflow">if</span> (oldTime &gt; time)
00648                 {
00649                         newTime = (time + oldTime*3)/4;
00650                 }
00651                 <span class="keywordflow">else</span>
00652                 {
00653                         newTime = (time*3 + oldTime)/4;
00654                 }
00655         }
00656         CClassifierPriority newPrio;
00657         newPrio.setPriorityTimer((*itMotivationClassifierSystems).second.getPriorityPart(classifierNumber).getPriorityTimer());
00658         newPrio.SetClassifierTimer(newTime);
00659 <span class="comment">//      newPrio.SetClassifierTimer(time);</span>
00660         (*itMotivationClassifierSystems).second.setPriorityPart(classifierNumber, newPrio);
00661 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea10" doxytag="NLAINIMAT::CMHiCSbase::learningUpdatePriorityValueTimeToSuccess" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NLAINIMAT::CMHiCSbase::learningUpdatePriorityValueTimeToSuccess </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a05371.html#a99">TMotivation</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>motivationName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a05371.html#a7">TClassifierNumber</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>classifierNumber</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>timeToSuccess</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Update a priority value in learning mode. 
<p>

<p>
Definition at line <a class="el" href="a06032.html#l00605">605</a> of file <a class="el" href="a06032.html">mhics.cpp</a>.
<p>
References <a class="el" href="a06033.html#l00188">_MotivationClassifierSystems</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05551.html#l00064">NLAINIMAT::CClassifierPriority::SetClassifierTimer()</a>, <a class="el" href="a05551.html#l00059">NLAINIMAT::CClassifierPriority::setPriorityTimer()</a>, <a class="el" href="a05552.html#l00064">NLAINIMAT::TClassifierNumber</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
Referenced by <a class="el" href="a06032.html#l01219">NLAINIMAT::CMHiCSagent::learningComputation()</a>.
<p>
<div class="fragment"><pre>00606 {
00607         <span class="comment">// Le but est de faire une moyenne sur les valeurs de fitness. Pour �a on fait une moyenne sur les 4 pas de temps pr�c�dents.</span>
00608         std::map&lt;TMotivation, CClassifierSystem&gt;::iterator itMotivationClassifierSystems = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.find(motivationName);
00609         <a class="code" href="a04199.html#a6">nlassert</a>(itMotivationClassifierSystems != <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.end());
00610         <a class="code" href="a04558.html#a11">uint32</a> oldTime2Success = (*itMotivationClassifierSystems).second.getPriorityPart(classifierNumber).getPriorityTimer();
00611         <a class="code" href="a04558.html#a11">uint32</a> newTime2Success;
00612         <span class="keywordflow">if</span> (oldTime2Success == 0)
00613         {
00614                 newTime2Success = timeToSuccess;
00615         }
00616         <span class="keywordflow">else</span>
00617         {
00618                 <span class="keywordflow">if</span> (oldTime2Success &gt; timeToSuccess)
00619                 {
00620                         newTime2Success = (timeToSuccess*3 + oldTime2Success)/4;
00621                 }
00622                 <span class="keywordflow">else</span>
00623                 {
00624                         newTime2Success = (timeToSuccess + oldTime2Success*3)/4;
00625                 }
00626         }
00627 <span class="comment">//      nlassert (newTime2Success != 0);</span>
00628         CClassifierPriority newPrio;
00629         newPrio.setPriorityTimer(newTime2Success);
00630 <span class="comment">//      newPrio.setPriorityTimer(timeToSuccess);</span>
00631         newPrio.SetClassifierTimer((*itMotivationClassifierSystems).second.getPriorityPart(classifierNumber).getClassifierTimer());
00632         (*itMotivationClassifierSystems).second.setPriorityPart(classifierNumber, newPrio);
00633 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea11" doxytag="NLAINIMAT::CMHiCSbase::loadClassifierFromFile" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool NLAINIMAT::CMHiCSbase::loadClassifierFromFile </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">std::string&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>fileName</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Load classifiers from a file. Return false if thereis a probleme. 
<p>

<p>
Definition at line <a class="el" href="a06032.html#l00391">391</a> of file <a class="el" href="a06032.html">mhics.cpp</a>.
<p>
References <a class="el" href="a05371.html#a101a76">NLAINIMAT::Action_Unknown</a>, <a class="el" href="a05371.html#a101a75">NLAINIMAT::Action_VIRTUAL_ACTIONS</a>, <a class="el" href="a06032.html#l00249">addActionCS()</a>, <a class="el" href="a05551.html#l00656">NLAINIMAT::CConditionMap::addIfNotSensorCondition()</a>, <a class="el" href="a05551.html#l00646">NLAINIMAT::CConditionMap::addIfSensorCondition()</a>, <a class="el" href="a06032.html#l00222">addVirtualActionCS()</a>, <a class="el" href="a05552.html#l00152">NLAINIMAT::CConditionMap::clear()</a>, <a class="el" href="a05708.html#l00255">NLMISC::CIFile::close()</a>, <a class="el" href="a05708.html#l00306">NLMISC::CIFile::getline()</a>, <a class="el" href="a05371.html#a99a21">NLAINIMAT::Motivation_Unknown</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05708.html#l00135">NLMISC::CIFile::open()</a>, <a class="el" href="a05371.html#a100a55">NLAINIMAT::Sensor_Unknown</a>, <a class="el" href="a05551.html#l00064">NLAINIMAT::CClassifierPriority::SetClassifierTimer()</a>, <a class="el" href="a06363.html#l00185">NLAINIMAT::TAction</a>, <a class="el" href="a06363.html#l00045">NLAINIMAT::TMotivation</a>, <a class="el" href="a06363.html#l00071">NLAINIMAT::TSensor</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
<div class="fragment"><pre>00392 {
00393         <span class="keywordtype">bool</span>                    ret;
00394         <span class="keyword">const</span> <a class="code" href="a04558.html#a11">uint32</a>    aboeufSize = 2048;
00395         <span class="keywordtype">char</span>                    aboeuf[aboeufSize];
00396         std::string             laLigne, leMot;
00397         <a class="code" href="a04558.html#a15">uint</a>                    lastPos = 0;
00398         <a class="code" href="a04558.html#a15">uint</a>                    nextPos = 0;
00399         <a class="code" href="a02653.html">NLMISC::CIFile</a>  melkior;
00400         CConditionMap   conditionsMap;
00401         std::map&lt;TAction, CActionClassifiers &gt;  actionsMap;
00402         std::vector&lt;TSensor&gt;                                    sensorVector;
00403         ret = melkior.<a class="code" href="a02653.html#NLMISC_1_1CIFilea12">open</a>(fileName, <span class="keyword">true</span>);
00404         <span class="keywordflow">if</span> (!ret) <span class="keywordflow">return</span> <span class="keyword">false</span>;
00405         <span class="comment">// 1�re ligne : titre conditions</span>
00406         melkior.<a class="code" href="a02653.html#NLMISC_1_1CIFilea7">getline</a>(aboeuf, aboeufSize);
00407         <span class="comment">// 2�me ligne : Motivations; [Condition]*; Actions; priority; blabla</span>
00408         melkior.<a class="code" href="a02653.html#NLMISC_1_1CIFilea7">getline</a>(aboeuf, aboeufSize);
00409         laLigne = aboeuf;
00410         <span class="comment">// on construit une map avec les conditions</span>
00411         nextPos = laLigne.find_first_of(<span class="stringliteral">";"</span>,lastPos);
00412         leMot = laLigne.substr(lastPos,nextPos - lastPos);
00413         <a class="code" href="a04199.html#a6">nlassert</a>(leMot == <span class="stringliteral">"Motivations"</span>);
00414         lastPos = nextPos+1;
00415         nextPos = laLigne.find_first_of(<span class="stringliteral">";"</span>, lastPos);
00416         leMot = laLigne.substr(lastPos, nextPos-lastPos);
00417         <span class="keywordflow">while</span> (leMot != <span class="stringliteral">"Actions"</span>)
00418         {
00419                 <span class="comment">// on regarde le type du senseur :</span>
00420                 <a class="code" href="a05371.html#a100">TSensor</a> titi = conversionSensor.fromString(leMot);
00421                 <a class="code" href="a04199.html#a6">nlassert</a> (titi != Sensor_Unknown);
00422                 sensorVector.push_back(titi);
00423 
00424                 lastPos = nextPos+1;
00425                 nextPos = laLigne.find_first_of(<span class="stringliteral">";"</span>, lastPos);
00426                 leMot = laLigne.substr(lastPos, nextPos-lastPos);
00427         }
00428         <span class="comment">// on parse le reste</span>
00429         melkior.<a class="code" href="a02653.html#NLMISC_1_1CIFilea7">getline</a>(aboeuf, aboeufSize);
00430         laLigne = aboeuf;
00431         lastPos = 0;
00432         nextPos = 0;
00433         <span class="keywordflow">while</span> (laLigne.size() &gt; 0)
00434         {
00435                 <a class="code" href="a05371.html#a99">TMotivation</a> laMotive;
00436                 <a class="code" href="a05371.html#a101">TAction</a>         laVirtuelle;
00437                 <span class="comment">// On r�cup�re le nom de la motivation</span>
00438                 nextPos = laLigne.find_first_of(<span class="stringliteral">";"</span>,lastPos);
00439                 leMot = laLigne.substr(lastPos,nextPos - lastPos);
00440                 <span class="keywordflow">if</span> (leMot.size() == 0) <span class="keywordflow">break</span>;
00441                 laMotive = conversionMotivation.fromString(leMot);
00442                 <span class="keywordflow">if</span> (laMotive == <a class="code" href="a05371.html#a99a21">Motivation_Unknown</a>)
00443                 {
00444                         <span class="comment">// Si c'est pas une motivation, c'est peut-�tre une action virtuelle.</span>
00445                         laVirtuelle = conversionAction.fromString(leMot);
00446                         <a class="code" href="a04199.html#a6">nlassert</a>(laVirtuelle != Action_Unknown);
00447                 }
00448                 
00449                 lastPos = nextPos+1;
00450                 nextPos = laLigne.find_first_of(<span class="stringliteral">";"</span>,lastPos);
00451                 leMot = laLigne.substr(lastPos,nextPos - lastPos);
00452                 
00453                 <span class="comment">// On r�cup�re la liste des conditions</span>
00454                 <a class="code" href="a04558.html#a15">uint</a> ii;
00455                 <span class="keywordflow">for</span> (ii = 0; ii &lt; sensorVector.size(); ii++)
00456                 {
00457                         <span class="keywordflow">if</span> (leMot.size() &gt;0)
00458                         {
00459                                 <a class="code" href="a05371.html#a100">TSensor</a> sensorName = sensorVector[ii];
00460                                 <span class="keywordflow">if</span> (leMot[0] == <span class="charliteral">'!'</span>)
00461                                 {
00462                                         conditionsMap.addIfNotSensorCondition(sensorName,leMot[1]);
00463                                 }
00464                                 <span class="keywordflow">else</span>
00465                                 {
00466                                         conditionsMap.addIfSensorCondition(sensorName,leMot[0]);
00467                                 }
00468                         }
00469 
00470                         lastPos = nextPos+1;
00471                         nextPos = laLigne.find_first_of(<span class="stringliteral">";"</span>,lastPos);
00472                         leMot = laLigne.substr(lastPos,nextPos - lastPos);
00473                 }
00474                 <span class="comment">// on r�cup�re le nom de l'action</span>
00475                 <a class="code" href="a05371.html#a101">TAction</a> actionName = conversionAction.fromString(leMot);
00476                 <a class="code" href="a04199.html#a6">nlassert</a>(actionName != Action_Unknown);
00477 
00478                 lastPos = nextPos+1;
00479                 nextPos = laLigne.find_first_of(<span class="stringliteral">";"</span>,lastPos);
00480                 leMot = laLigne.substr(lastPos,nextPos - lastPos);
00481 
00482                 <span class="comment">// on r�cup�re la force du classeur</span>
00483                 CClassifierPriority laforce;
00484                 laforce.SetClassifierTimer( atof(leMot.c_str()) );
00485 
00486                 <span class="comment">// on rajoute la r�gle dans les actions.</span>
00487                 std::map&lt;TAction, CActionClassifiers &gt;::iterator itActionsMap = actionsMap.find(actionName);
00488                 <span class="keywordflow">if</span> (itActionsMap == actionsMap.end())
00489                 {
00490                         CActionClassifiers bibu(actionName);
00491                         actionsMap.insert(std::make_pair(actionName, bibu));
00492                 }
00493                 CActionClassifiers mon_action(actionName);
00494                 <span class="comment">// Si la motivation est inconnue, c'est que c'est une action virtuelle.</span>
00495                 <span class="keywordflow">if</span> (laMotive == <a class="code" href="a05371.html#a99a21">Motivation_Unknown</a>)
00496                 {
00497                         actionsMap[actionName].addVirtualActionRule(laVirtuelle,conditionsMap, laforce);
00498                 }
00499                 <span class="keywordflow">else</span>
00500                 {
00501                         actionsMap[actionName].addMotivationRule(laMotive,conditionsMap, laforce);
00502                 }
00503 
00504                 conditionsMap.clear();
00505                 melkior.<a class="code" href="a02653.html#NLMISC_1_1CIFilea7">getline</a>(aboeuf, aboeufSize);
00506                 laLigne = aboeuf;
00507                 lastPos = 0;
00508                 nextPos = 0;
00509         }
00510         melkior.<a class="code" href="a02653.html#NLMISC_1_1CIFilea3">close</a>();
00511 
00512         std::map&lt;TAction, CActionClassifiers &gt;::iterator itActionsMap;
00513         <span class="keywordflow">for</span> (itActionsMap = actionsMap.begin(); itActionsMap != actionsMap.end(); itActionsMap++)
00514         {
00515                 <span class="comment">//***G*** ajouter aussi la gestion des actions virtuels</span>
00516                 <a class="code" href="a05371.html#a101">TAction</a> testAction = (*itActionsMap).second.getName();
00517                 <a class="code" href="a04199.html#a6">nlassert</a> (testAction != Action_Unknown);
00518                 <span class="keywordflow">if</span> (testAction &gt; <a class="code" href="a05371.html#a101a75">Action_VIRTUAL_ACTIONS</a>)
00519                 {
00520                         <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea1">addVirtualActionCS</a>( (*itActionsMap).second );
00521                 }
00522                 <span class="keywordflow">else</span>
00523                 {
00524                         <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbasea0">addActionCS</a>( (*itActionsMap).second );
00525                 }
00526         }
00527 
00528         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00529 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea12" doxytag="NLAINIMAT::CMHiCSbase::printDebugString" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NLAINIMAT::CMHiCSbase::printDebugString </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06032.html#l00359">359</a> of file <a class="el" href="a06032.html">mhics.cpp</a>.
<p>
References <a class="el" href="a06033.html#l00190">_ActionSet</a>, <a class="el" href="a06033.html#l00188">_MotivationClassifierSystems</a>, <a class="el" href="a06033.html#l00189">_VirtualActionClassifierSystems</a>, and <a class="el" href="a05622.html#l00101">nldebug</a>.
<p>
<div class="fragment"><pre>00360 {
00361         std::string ret = <span class="stringliteral">""</span>;
00362         <a class="code" href="a04199.html#a0">nldebug</a>(<span class="stringliteral">"\n---------------------------"</span>);
00363         std::map&lt;TMotivation, CClassifierSystem&gt;::const_iterator itMotivationClassifierSystems;
00364         <span class="keywordflow">for</span> (itMotivationClassifierSystems = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.begin(); itMotivationClassifierSystems != <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.end(); itMotivationClassifierSystems++)
00365         {
00366                 ret += ((<span class="stringliteral">"\nMotivation : "</span> + conversionMotivation.toString((*itMotivationClassifierSystems).first)).c_str());
00367                 (*itMotivationClassifierSystems).second.getDebugString(ret);
00368                 <a class="code" href="a04199.html#a0">nldebug</a>(ret.c_str());
00369                 ret = <span class="stringliteral">""</span>;
00370         }
00371         std::map&lt;TAction, CClassifierSystem&gt;::const_iterator itVirtualActionClassifierSystems;
00372         <span class="keywordflow">for</span> (itVirtualActionClassifierSystems = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser2">_VirtualActionClassifierSystems</a>.begin(); itVirtualActionClassifierSystems != <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser2">_VirtualActionClassifierSystems</a>.end(); itVirtualActionClassifierSystems++)
00373         {
00374                 ret += ((<span class="stringliteral">"\nVirtual Action : "</span> + conversionAction.toString((*itVirtualActionClassifierSystems).first)).c_str());
00375                 (*itVirtualActionClassifierSystems).second.getDebugString(ret);
00376                 <a class="code" href="a04199.html#a0">nldebug</a>(ret.c_str());
00377                 ret = <span class="stringliteral">""</span>;
00378         }
00379         ret += (<span class="stringliteral">"\nACTIONS :\n"</span>);
00380         std::set&lt;TAction&gt;::const_iterator itActionSet;
00381         <span class="keywordflow">for</span> (itActionSet = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser0">_ActionSet</a>.begin(); itActionSet != <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser0">_ActionSet</a>.end(); itActionSet++)
00382         {
00383                 ret += ((conversionAction.toString((*itActionSet)) + <span class="stringliteral">"\n"</span>).c_str());
00384                 <a class="code" href="a04199.html#a0">nldebug</a>(ret.c_str());
00385                 ret = <span class="stringliteral">""</span>;
00386         }
00387 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea13" doxytag="NLAINIMAT::CMHiCSbase::selectBehavior" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NLAINIMAT::CMHiCSbase::selectBehavior </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a05371.html#a99">TMotivation</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>motivationName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02422.html">CCSPerception</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>psensorMap</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::multimap&lt; <a class="el" href="a02342.html">CClassifierPriority</a>, std::pair&lt; <a class="el" href="a05371.html#a7">TClassifierNumber</a>, <a class="el" href="a05371.html#a13">TTargetId</a> &gt; &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>mapActivableCS</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Select a behavior according to the values in the sensorMap. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>motivationName</em>&nbsp;</td><td>is the name of the CS that must be activated </td></tr>
    <tr><td valign=top><em>sensorMap</em>&nbsp;</td><td>is a map whose key is the sensor name and value the sensor value. </td></tr>
    <tr><td valign=top><em>lastClassifierNumber</em>&nbsp;</td><td>is the number of the last classifier selected. Also used as a return value. </td></tr>
    <tr><td valign=top><em>lastTarget</em>&nbsp;</td><td>is the ID of the last target associated with the last classifier. Also used as a return value. </td></tr>
    <tr><td valign=top><em>lastSelectionMaxPriority</em>&nbsp;</td><td>is the Priority given to the last selected classifier (witch is the max of all the last activable classifier priority). Also used as a return value.</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a06032.html#l00256">256</a> of file <a class="el" href="a06032.html">mhics.cpp</a>.
<p>
References <a class="el" href="a06033.html#l00188">_MotivationClassifierSystems</a>.
<p>
Referenced by <a class="el" href="a06032.html#l00982">NLAINIMAT::CMHiCSagent::motivationCompute()</a>.
<p>
<div class="fragment"><pre>00259 {
00260         std::map&lt;TMotivation, CClassifierSystem&gt;::iterator itMotivationClassifierSystems = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.find(motivationName);
00261         <span class="keywordflow">if</span> (itMotivationClassifierSystems != <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.end())
00262         {
00263                 (*itMotivationClassifierSystems).second.selectBehavior(psensorMap, mapActivableCS);
00264         }
00265 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbasea14" doxytag="NLAINIMAT::CMHiCSbase::setPriorityValue" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NLAINIMAT::CMHiCSbase::setPriorityValue </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a05371.html#a99">TMotivation</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>motivationName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a05371.html#a7">TClassifierNumber</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>classifierNumber</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02342.html">CClassifierPriority</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>priority</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set a new value for a classifier priority. 
<p>

<p>
Definition at line <a class="el" href="a06032.html#l00320">320</a> of file <a class="el" href="a06032.html">mhics.cpp</a>.
<p>
References <a class="el" href="a06033.html#l00188">_MotivationClassifierSystems</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05552.html#l00064">NLAINIMAT::TClassifierNumber</a>.
<p>
<div class="fragment"><pre>00321 {
00322         std::map&lt;TMotivation, CClassifierSystem&gt;::iterator itMotivationClassifierSystems = <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.find(motivationName);
00323         <a class="code" href="a04199.html#a6">nlassert</a>(itMotivationClassifierSystems != <a class="code" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">_MotivationClassifierSystems</a>.end());
00324         (*itMotivationClassifierSystems).second.setPriorityPart(classifierNumber, priority);
00325 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbaser0" doxytag="NLAINIMAT::CMHiCSbase::_ActionSet" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> std::set&lt;<a class="el" href="a05371.html#a101">TAction</a>&gt; <a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser0">NLAINIMAT::CMHiCSbase::_ActionSet</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06033.html#l00190">190</a> of file <a class="el" href="a06033.html">mhics.h</a>.
<p>
Referenced by <a class="el" href="a06032.html#l00249">addActionCS()</a>, <a class="el" href="a06032.html#l00334">getDebugString()</a>, <a class="el" href="a06032.html#l00327">isAnAction()</a>, and <a class="el" href="a06032.html#l00359">printDebugString()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbaser1" doxytag="NLAINIMAT::CMHiCSbase::_MotivationClassifierSystems" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> std::map&lt;<a class="el" href="a05371.html#a99">TMotivation</a>, <a class="el" href="a02343.html">CClassifierSystem</a>&gt; <a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser1">NLAINIMAT::CMHiCSbase::_MotivationClassifierSystems</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06033.html#l00188">188</a> of file <a class="el" href="a06033.html">mhics.h</a>.
<p>
Referenced by <a class="el" href="a06032.html#l00222">addVirtualActionCS()</a>, <a class="el" href="a06032.html#l00531">dbgPrintClassifierPriorityInFile()</a>, <a class="el" href="a06032.html#l00285">getActionPart()</a>, <a class="el" href="a06032.html#l00334">getDebugString()</a>, <a class="el" href="a06032.html#l00303">getPriorityPart()</a>, <a class="el" href="a06032.html#l00634">learningUpdatePriorityValueClassifierTime()</a>, <a class="el" href="a06032.html#l00605">learningUpdatePriorityValueTimeToSuccess()</a>, <a class="el" href="a06032.html#l00359">printDebugString()</a>, <a class="el" href="a06032.html#l00256">selectBehavior()</a>, and <a class="el" href="a06032.html#l00320">setPriorityValue()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbaser2" doxytag="NLAINIMAT::CMHiCSbase::_VirtualActionClassifierSystems" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> std::map&lt;<a class="el" href="a05371.html#a101">TAction</a>, <a class="el" href="a02343.html">CClassifierSystem</a>&gt; <a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbaser2">NLAINIMAT::CMHiCSbase::_VirtualActionClassifierSystems</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06033.html#l00189">189</a> of file <a class="el" href="a06033.html">mhics.h</a>.
<p>
Referenced by <a class="el" href="a06032.html#l00222">addVirtualActionCS()</a>, <a class="el" href="a06032.html#l00334">getDebugString()</a>, and <a class="el" href="a06032.html#l00359">printDebugString()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLAINIMAT_1_1CMHiCSbaseo0" doxytag="NLAINIMAT::CMHiCSbase::pActionResources" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a02159.html">CActionResources</a>* <a class="el" href="a02929.html#NLAINIMAT_1_1CMHiCSbaseo0">NLAINIMAT::CMHiCSbase::pActionResources</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06033.html#l00185">185</a> of file <a class="el" href="a06033.html">mhics.h</a>.
<p>
Referenced by <a class="el" href="a06032.html#l00212">CMHiCSbase()</a>, <a class="el" href="a06032.html#l01548">NLAINIMAT::CMHiCSagent::selectBehavior()</a>, and <a class="el" href="a06032.html#l00217">~CMHiCSbase()</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a06033.html">mhics.h</a><li><a class="el" href="a06032.html">mhics.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 11:10:34 2004 for NeL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.6 </small></address>
</body>
</html>