-
Notifications
You must be signed in to change notification settings - Fork 0
/
LearnFromInformed.cs
44 lines (31 loc) · 1.07 KB
/
LearnFromInformed.cs
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
using System.Collections;
using System;
class LearnFromInformed : Exploration {
private ArrayList performanceData;
private int endOfLearning = 6;
public LearnFromInformed(int numberOfRows, int numberOfColumns) : base(numberOfRows,numberOfColumns) {
this.numberOfActions = 1;
this.millisecondsToWait = 10000;
performanceData = new ArrayList();
}
override public ArrayList Explore(ArrayList cellsToCollect, ArrayList cellsToSuck, int [] cell){
Informed informed = new Informed(numberOfRows,numberOfColumns);
return informed.Explore(cellsToCollect,cellsToSuck,cell);
}
public void UpdatePerformanceData(int value){
performanceData.Add(value);
}
public int CountItemsInPerformanceData(){
return performanceData.Count;
}
public void DisplayPerformanceData(){
String line = "";
foreach(int value in performanceData){
line+=value + " ";
}
Console.WriteLine(line);
}
public int GetEndOfLearning(){
return endOfLearning;
}
}