Neodroid
0.2.0
Machine Learning Environment Prototyping Tool
CategoricalSensor.cs
Go to the documentation of this file.
1
using
System
.Collections.Generic;
2
using
droid
.
Runtime
.
Interfaces
;
3
using
droid
.
Runtime
.
Utilities
.
GameObjects
;
4
using
droid
.
Runtime
.
Utilities
.
Structs
;
5
using
UnityEngine
;
6
7
namespace
droid
.Runtime.Prototyping.Sensors.Experimental {
11
[AddComponentMenu(SensorComponentMenuPath._ComponentMenuPath
12
+
"Categorical"
13
+ SensorComponentMenuPath._Postfix)]
14
public
class
CategoricalSensor
:
Sensor
,
15
IHasSingle
{
16
[SerializeField]
PrototypingGameObject
_categoryProvider = null;
17
[SerializeField]
float
_observationValue = 0;
18
19
//void OneHotEncoding() { }
20
21
/*public override string PrototypingTypeName {
22
get { return "CategoricalSensor"; }
23
}*/
24
25
public
override
IEnumerable<float> FloatEnumerable {
get
{
return
new
[] {this.ObservationValue}; } }
26
30
public
override
void
UpdateObservation
() {
31
if
(this._categoryProvider is
ICategoryProvider
provider) {
32
this.ObservationValue = provider.CurrentCategoryValue;
33
}
34
}
35
36
public
float
ObservationValue {
37
get
{
return
this._observationValue; }
38
private
set
{ this._observationValue = value; }
39
}
40
41
public
Space1
SingleSpace {
get
; }
42
}
43
}
droid.Runtime.Interfaces
Definition:
IAbstractPrototypingEnvironment.cs:5
droid.Runtime.Prototyping.Sensors.Sensor
Definition:
Sensor.cs:16
System
droid.Runtime.Interfaces.ICategoryProvider
Definition:
ICategoryProvider.cs:4
droid.Runtime.Utilities.Structs
Definition:
DoubleVector3.cs:4
droid.Runtime.Utilities.GameObjects.PrototypingGameObject
Definition:
PrototypingGameObject.cs:10
droid
droid.Runtime.Utilities.GameObjects
droid.Runtime.Utilities
droid.Runtime.Utilities.Structs.Space1
Definition:
Space1.cs:11
droid.Runtime.Prototyping.Sensors.Experimental.CategoricalSensor.UpdateObservation
override void UpdateObservation()
Definition:
CategoricalSensor.cs:30
droid.Runtime.Prototyping.Sensors.Experimental.CategoricalSensor
Definition:
CategoricalSensor.cs:14
droid.Runtime
droid.Runtime.Interfaces.IHasSingle
Definition:
IHasSingle.cs:6
UnityEngine
Runtime
Prototyping
Sensors
Experimental
CategoricalSensor.cs
Generated by
1.8.13