@@ -19,9 +19,9 @@ MonoBehaviour: | |||
cameraResolutions: | |||
- width: 80 | |||
height: 30 | |||
blackAndWhite: 0 | |||
blackAndWhite: 1 | |||
vectorActionDescriptions: | |||
- | |||
vectorActionSpaceType: 0 | |||
model: {fileID: 0} | |||
model: {fileID: 11400000, guid: 24baaa8c605c1a74785880885cf04847, type: 3} | |||
inferenceDevice: 0 |
@@ -0,0 +1,10 @@ | |||
fileFormatVersion: 2 | |||
guid: 24baaa8c605c1a74785880885cf04847 | |||
ScriptedImporter: | |||
fileIDToRecycleName: | |||
11400000: Assets/Brains/CozmoLearningBrain.nn | |||
externalObjects: {} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: | |||
script: {fileID: 11500000, guid: 83221ad3db87f4b3b91b041047cb2bc5, type: 3} |
@@ -0,0 +1,10 @@ | |||
fileFormatVersion: 2 | |||
guid: c9717311ba788544a9b6db7dd147300d | |||
ScriptedImporter: | |||
fileIDToRecycleName: | |||
11400002: Assets/Brains/CozmoTrainedBrain.nn | |||
externalObjects: {} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: | |||
script: {fileID: 11500000, guid: 83221ad3db87f4b3b91b041047cb2bc5, type: 3} |
@@ -1,5 +1,168 @@ | |||
%YAML 1.1 | |||
%TAG !u! tag:unity3d.com,2011: | |||
--- !u!1 &891713638 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
serializedVersion: 6 | |||
m_Component: | |||
- component: {fileID: 891713639} | |||
- component: {fileID: 891713640} | |||
- component: {fileID: 891713641} | |||
m_Layer: 0 | |||
m_Name: RenderTextureCamera | |||
m_TagString: Untagged | |||
m_Icon: {fileID: 0} | |||
m_NavMeshLayer: 0 | |||
m_StaticEditorFlags: 0 | |||
m_IsActive: 1 | |||
--- !u!4 &891713639 | |||
Transform: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 891713638} | |||
m_LocalRotation: {x: 0.30070576, y: 0, z: 0, w: 0.953717} | |||
m_LocalPosition: {x: 0, y: 0.037, z: 0.0319} | |||
m_LocalScale: {x: 1, y: 1, z: 1} | |||
m_Children: [] | |||
m_Father: {fileID: 7570006595835424293} | |||
m_RootOrder: 1 | |||
m_LocalEulerAnglesHint: {x: 35, y: 0, z: 0} | |||
--- !u!20 &891713640 | |||
Camera: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 891713638} | |||
m_Enabled: 0 | |||
serializedVersion: 2 | |||
m_ClearFlags: 1 | |||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} | |||
m_projectionMatrixMode: 1 | |||
m_SensorSize: {x: 36, y: 24} | |||
m_LensShift: {x: 0, y: 0} | |||
m_GateFitMode: 2 | |||
m_FocalLength: 50 | |||
m_NormalizedViewPortRect: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 0 | |||
width: 1 | |||
height: 1 | |||
near clip plane: 0.01 | |||
far clip plane: 2 | |||
field of view: 60 | |||
orthographic: 0 | |||
orthographic size: 5 | |||
m_Depth: 0 | |||
m_CullingMask: | |||
serializedVersion: 2 | |||
m_Bits: 4294967295 | |||
m_RenderingPath: -1 | |||
m_TargetTexture: {fileID: 8400000, guid: 196f45b12806aaa449adc2ee1ca3b091, type: 2} | |||
m_TargetDisplay: 0 | |||
m_TargetEye: 3 | |||
m_HDR: 0 | |||
m_AllowMSAA: 0 | |||
m_AllowDynamicResolution: 0 | |||
m_ForceIntoRT: 0 | |||
m_OcclusionCulling: 1 | |||
m_StereoConvergence: 10 | |||
m_StereoSeparation: 0.022 | |||
--- !u!114 &891713641 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 891713638} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: b940f59f459dc49479614595d02dcbbc, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
renderTextureCropped: {fileID: 8400000, guid: 8bf12f4401860c043a77209428e97b29, | |||
type: 2} | |||
processedImageRenderer: {fileID: 0} | |||
processedImageRendererCropped: {fileID: 0} | |||
--- !u!1 &7536190859451953316 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
serializedVersion: 6 | |||
m_Component: | |||
- component: {fileID: 6557257430302465736} | |||
- component: {fileID: 6829507564963703646} | |||
m_Layer: 0 | |||
m_Name: Camera | |||
m_TagString: Untagged | |||
m_Icon: {fileID: 0} | |||
m_NavMeshLayer: 0 | |||
m_StaticEditorFlags: 0 | |||
m_IsActive: 1 | |||
--- !u!4 &6557257430302465736 | |||
Transform: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 7536190859451953316} | |||
m_LocalRotation: {x: 0.30070576, y: 0, z: 0, w: 0.953717} | |||
m_LocalPosition: {x: 0, y: 0.037, z: 0.0319} | |||
m_LocalScale: {x: 1, y: 1, z: 1} | |||
m_Children: [] | |||
m_Father: {fileID: 7570006595835424293} | |||
m_RootOrder: 2 | |||
m_LocalEulerAnglesHint: {x: 35, y: 0, z: 0} | |||
--- !u!20 &6829507564963703646 | |||
Camera: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 7536190859451953316} | |||
m_Enabled: 0 | |||
serializedVersion: 2 | |||
m_ClearFlags: 1 | |||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} | |||
m_projectionMatrixMode: 1 | |||
m_SensorSize: {x: 36, y: 24} | |||
m_LensShift: {x: 0, y: 0} | |||
m_GateFitMode: 2 | |||
m_FocalLength: 50 | |||
m_NormalizedViewPortRect: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 0 | |||
width: 1 | |||
height: 1 | |||
near clip plane: 0.01 | |||
far clip plane: 2 | |||
field of view: 60 | |||
orthographic: 0 | |||
orthographic size: 5 | |||
m_Depth: 0 | |||
m_CullingMask: | |||
serializedVersion: 2 | |||
m_Bits: 4294967295 | |||
m_RenderingPath: -1 | |||
m_TargetTexture: {fileID: 0} | |||
m_TargetDisplay: 0 | |||
m_TargetEye: 3 | |||
m_HDR: 0 | |||
m_AllowMSAA: 0 | |||
m_AllowDynamicResolution: 0 | |||
m_ForceIntoRT: 0 | |||
m_OcclusionCulling: 1 | |||
m_StereoConvergence: 10 | |||
m_StereoSeparation: 0.022 | |||
--- !u!1 &7570006595835424292 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
@@ -9,6 +172,12 @@ GameObject: | |||
serializedVersion: 6 | |||
m_Component: | |||
- component: {fileID: 7570006595835424293} | |||
- component: {fileID: 7570006596986120127} | |||
- component: {fileID: 7570006596986120126} | |||
- component: {fileID: 7570006596986120125} | |||
- component: {fileID: 7570006596986120128} | |||
- component: {fileID: 7570006596986120129} | |||
- component: {fileID: 7570006596986120130} | |||
m_Layer: 0 | |||
m_Name: Cozmo | |||
m_TagString: Untagged | |||
@@ -28,9 +197,105 @@ Transform: | |||
m_LocalScale: {x: 1, y: 1, z: 1} | |||
m_Children: | |||
- {fileID: 1857425275648181110} | |||
- {fileID: 891713639} | |||
- {fileID: 6557257430302465736} | |||
m_Father: {fileID: 0} | |||
m_RootOrder: 0 | |||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||
--- !u!54 &7570006596986120127 | |||
Rigidbody: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 7570006595835424292} | |||
serializedVersion: 2 | |||
m_Mass: 1 | |||
m_Drag: 0 | |||
m_AngularDrag: 0.05 | |||
m_UseGravity: 1 | |||
m_IsKinematic: 0 | |||
m_Interpolate: 0 | |||
m_Constraints: 84 | |||
m_CollisionDetection: 0 | |||
--- !u!65 &7570006596986120126 | |||
BoxCollider: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 7570006595835424292} | |||
m_Material: {fileID: 0} | |||
m_IsTrigger: 0 | |||
m_Enabled: 1 | |||
serializedVersion: 2 | |||
m_Size: {x: 0.05, y: 0.07, z: 0.08} | |||
m_Center: {x: 0, y: 0.035, z: 0} | |||
--- !u!114 &7570006596986120125 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 7570006595835424292} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: 234fd6e10ef55ad4b82b3153890ab5d9, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
brain: {fileID: 11400000, guid: 0d9d5ce547064a648b466ad7f208cf3d, type: 2} | |||
agentParameters: | |||
agentCameras: [] | |||
agentRenderTextures: | |||
- {fileID: 8400000, guid: 8bf12f4401860c043a77209428e97b29, type: 2} | |||
maxStep: 5000 | |||
resetOnDone: 1 | |||
onDemandDecision: 1 | |||
numberOfActionsBetweenDecisions: 1 | |||
renderCamera: {fileID: 891713640} | |||
movementController: {fileID: 7570006596986120130} | |||
timeBetweenDecisionsAtInference: 0.15 | |||
--- !u!114 &7570006596986120128 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 7570006595835424292} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: d2056048a78a0cc4c97e7899ba1c0e31, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_Speed: 0.0535 | |||
m_TurnSpeed: 55 | |||
--- !u!114 &7570006596986120129 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 7570006595835424292} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: 4265d0764c65d26409f0f920e5293c82, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
testState: 1 | |||
isTesting: 0 | |||
--- !u!114 &7570006596986120130 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 7570006595835424292} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: d3ecda30187828846b48edbee97aebd7, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
currentMovementState: 0 | |||
--- !u!1001 &1857425275647793654 | |||
PrefabInstance: | |||
m_ObjectHideFlags: 0 |
@@ -122,7 +122,7 @@ GameObject: | |||
m_Component: | |||
- component: {fileID: 99578049} | |||
m_Layer: 0 | |||
m_Name: Environment | |||
m_Name: Environment_0 | |||
m_TagString: Untagged | |||
m_Icon: {fileID: 0} | |||
m_NavMeshLayer: 0 | |||
@@ -146,8 +146,9 @@ Transform: | |||
- {fileID: 2078653368} | |||
- {fileID: 435986020} | |||
- {fileID: 712179487} | |||
- {fileID: 7570006596986120124} | |||
m_Father: {fileID: 0} | |||
m_RootOrder: 1 | |||
m_RootOrder: 3 | |||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||
--- !u!1 &125995086 | |||
GameObject: | |||
@@ -484,79 +485,6 @@ BoxCollider: | |||
serializedVersion: 2 | |||
m_Size: {x: 0.1, y: 0.1, z: 0.1} | |||
m_Center: {x: 0, y: 0, z: 0.030643802} | |||
--- !u!1 &589453881 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
serializedVersion: 6 | |||
m_Component: | |||
- component: {fileID: 589453883} | |||
- component: {fileID: 589453882} | |||
m_Layer: 0 | |||
m_Name: Camera | |||
m_TagString: MainCamera | |||
m_Icon: {fileID: 0} | |||
m_NavMeshLayer: 0 | |||
m_StaticEditorFlags: 0 | |||
m_IsActive: 1 | |||
--- !u!20 &589453882 | |||
Camera: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 589453881} | |||
m_Enabled: 1 | |||
serializedVersion: 2 | |||
m_ClearFlags: 1 | |||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} | |||
m_projectionMatrixMode: 1 | |||
m_SensorSize: {x: 36, y: 24} | |||
m_LensShift: {x: 0, y: 0} | |||
m_GateFitMode: 2 | |||
m_FocalLength: 50 | |||
m_NormalizedViewPortRect: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 0 | |||
width: 1 | |||
height: 1 | |||
near clip plane: 0.01 | |||
far clip plane: 2 | |||
field of view: 60 | |||
orthographic: 0 | |||
orthographic size: 5 | |||
m_Depth: 0 | |||
m_CullingMask: | |||
serializedVersion: 2 | |||
m_Bits: 4294967295 | |||
m_RenderingPath: -1 | |||
m_TargetTexture: {fileID: 0} | |||
m_TargetDisplay: 0 | |||
m_TargetEye: 3 | |||
m_HDR: 1 | |||
m_AllowMSAA: 1 | |||
m_AllowDynamicResolution: 0 | |||
m_ForceIntoRT: 0 | |||
m_OcclusionCulling: 1 | |||
m_StereoConvergence: 10 | |||
m_StereoSeparation: 0.022 | |||
--- !u!4 &589453883 | |||
Transform: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 589453881} | |||
m_LocalRotation: {x: 0.30070576, y: 0, z: 0, w: 0.953717} | |||
m_LocalPosition: {x: 0, y: 0.037, z: 0.0319} | |||
m_LocalScale: {x: 1, y: 1, z: 1} | |||
m_Children: [] | |||
m_Father: {fileID: 7570006596986120124} | |||
m_RootOrder: 2 | |||
m_LocalEulerAnglesHint: {x: 35, y: 0, z: 0} | |||
--- !u!1 &712179486 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
@@ -780,6 +708,8 @@ MonoBehaviour: | |||
- {fileID: 774534267} | |||
- {fileID: 380448016} | |||
- {fileID: 1159195260} | |||
- {fileID: 0} | |||
- {fileID: 0} | |||
--- !u!4 &776834971 | |||
Transform: | |||
m_ObjectHideFlags: 0 | |||
@@ -792,7 +722,7 @@ Transform: | |||
m_LocalScale: {x: 1, y: 1, z: 1} | |||
m_Children: [] | |||
m_Father: {fileID: 0} | |||
m_RootOrder: 4 | |||
m_RootOrder: 2 | |||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||
--- !u!1 &827847801 | |||
GameObject: | |||
@@ -886,96 +816,6 @@ MeshFilter: | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 827847801} | |||
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} | |||
--- !u!1 &891713638 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
serializedVersion: 6 | |||
m_Component: | |||
- component: {fileID: 891713639} | |||
- component: {fileID: 891713640} | |||
- component: {fileID: 891713641} | |||
m_Layer: 0 | |||
m_Name: RenderTextureCamera | |||
m_TagString: Untagged | |||
m_Icon: {fileID: 0} | |||
m_NavMeshLayer: 0 | |||
m_StaticEditorFlags: 0 | |||
m_IsActive: 1 | |||
--- !u!4 &891713639 | |||
Transform: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 891713638} | |||
m_LocalRotation: {x: 0.30070576, y: 0, z: 0, w: 0.953717} | |||
m_LocalPosition: {x: 0, y: 0.037, z: 0.0319} | |||
m_LocalScale: {x: 1, y: 1, z: 1} | |||
m_Children: [] | |||
m_Father: {fileID: 7570006596986120124} | |||
m_RootOrder: 1 | |||
m_LocalEulerAnglesHint: {x: 35, y: 0, z: 0} | |||
--- !u!20 &891713640 | |||
Camera: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 891713638} | |||
m_Enabled: 1 | |||
serializedVersion: 2 | |||
m_ClearFlags: 1 | |||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} | |||
m_projectionMatrixMode: 1 | |||
m_SensorSize: {x: 36, y: 24} | |||
m_LensShift: {x: 0, y: 0} | |||
m_GateFitMode: 2 | |||
m_FocalLength: 50 | |||
m_NormalizedViewPortRect: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 0 | |||
width: 1 | |||
height: 1 | |||
near clip plane: 0.01 | |||
far clip plane: 2 | |||
field of view: 60 | |||
orthographic: 0 | |||
orthographic size: 5 | |||
m_Depth: 0 | |||
m_CullingMask: | |||
serializedVersion: 2 | |||
m_Bits: 4294967295 | |||
m_RenderingPath: -1 | |||
m_TargetTexture: {fileID: 8400000, guid: 196f45b12806aaa449adc2ee1ca3b091, type: 2} | |||
m_TargetDisplay: 0 | |||
m_TargetEye: 3 | |||
m_HDR: 0 | |||
m_AllowMSAA: 0 | |||
m_AllowDynamicResolution: 0 | |||
m_ForceIntoRT: 0 | |||
m_OcclusionCulling: 1 | |||
m_StereoConvergence: 10 | |||
m_StereoSeparation: 0.022 | |||
--- !u!114 &891713641 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 891713638} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: b940f59f459dc49479614595d02dcbbc, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
renderTextureCropped: {fileID: 8400000, guid: 8bf12f4401860c043a77209428e97b29, | |||
type: 2} | |||
processedImageRenderer: {fileID: 1863707383} | |||
processedImageRendererCropped: {fileID: 712179489} | |||
--- !u!1 &918537782 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
@@ -1102,17 +942,16 @@ MonoBehaviour: | |||
- {fileID: 11400000, guid: 0d9d5ce547064a648b466ad7f208cf3d, type: 2} | |||
_brainsToControl: | |||
- {fileID: 0} | |||
- {fileID: 11400000, guid: 0d9d5ce547064a648b466ad7f208cf3d, type: 2} | |||
maxSteps: 1000 | |||
maxSteps: 1500 | |||
trainingConfiguration: | |||
width: 80 | |||
height: 30 | |||
qualityLevel: 1 | |||
timeScale: 10 | |||
timeScale: 2 | |||
targetFrameRate: -1 | |||
inferenceConfiguration: | |||
width: 320 | |||
height: 120 | |||
width: 1280 | |||
height: 920 | |||
qualityLevel: 5 | |||
timeScale: 1 | |||
targetFrameRate: 60 | |||
@@ -1132,7 +971,7 @@ Transform: | |||
m_LocalScale: {x: 1, y: 1, z: 1} | |||
m_Children: [] | |||
m_Father: {fileID: 0} | |||
m_RootOrder: 2 | |||
m_RootOrder: 1 | |||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||
--- !u!1 &1159195260 | |||
GameObject: | |||
@@ -1685,72 +1524,6 @@ MeshFilter: | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 1863707380} | |||
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} | |||
--- !u!1 &1957393249 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
serializedVersion: 6 | |||
m_Component: | |||
- component: {fileID: 1957393252} | |||
- component: {fileID: 1957393251} | |||
- component: {fileID: 1957393250} | |||
m_Layer: 0 | |||
m_Name: EventSystem | |||
m_TagString: Untagged | |||
m_Icon: {fileID: 0} | |||
m_NavMeshLayer: 0 | |||
m_StaticEditorFlags: 0 | |||
m_IsActive: 1 | |||
--- !u!114 &1957393250 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 1957393249} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_HorizontalAxis: Horizontal | |||
m_VerticalAxis: Vertical | |||
m_SubmitButton: Submit | |||
m_CancelButton: Cancel | |||
m_InputActionsPerSecond: 10 | |||
m_RepeatDelay: 0.5 | |||
m_ForceModuleActive: 0 | |||
--- !u!114 &1957393251 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 1957393249} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_FirstSelected: {fileID: 0} | |||
m_sendNavigationEvents: 1 | |||
m_DragThreshold: 10 | |||
--- !u!4 &1957393252 | |||
Transform: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 1957393249} | |||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |||
m_LocalPosition: {x: 0, y: 0, z: 0} | |||
m_LocalScale: {x: 1, y: 1, z: 1} | |||
m_Children: [] | |||
m_Father: {fileID: 0} | |||
m_RootOrder: 5 | |||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||
--- !u!1 &2078653367 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
@@ -1786,28 +1559,13 @@ PrefabInstance: | |||
m_ObjectHideFlags: 0 | |||
serializedVersion: 2 | |||
m_Modification: | |||
m_TransformParent: {fileID: 0} | |||
m_TransformParent: {fileID: 99578049} | |||
m_Modifications: | |||
- target: {fileID: 7570006595835424292, guid: 0f97dac5215d69a4795763340d82925d, | |||
type: 3} | |||
propertyPath: m_Name | |||
value: Cozmo | |||
objectReference: {fileID: 0} | |||
- target: {fileID: 7570006595835424292, guid: 0f97dac5215d69a4795763340d82925d, | |||
type: 3} | |||
propertyPath: m_IsActive | |||
value: 1 | |||
objectReference: {fileID: 0} | |||
- target: {fileID: 7570006595835424292, guid: 0f97dac5215d69a4795763340d82925d, | |||
type: 3} | |||
propertyPath: m_Icon | |||
value: | |||
objectReference: {fileID: 0} | |||
- target: {fileID: 1857425275647696726, guid: 0f97dac5215d69a4795763340d82925d, | |||
type: 3} | |||
propertyPath: m_IsActive | |||
value: 1 | |||
objectReference: {fileID: 0} | |||
- target: {fileID: 7570006595835424293, guid: 0f97dac5215d69a4795763340d82925d, | |||
type: 3} | |||
propertyPath: m_LocalPosition.x | |||
@@ -1826,17 +1584,17 @@ PrefabInstance: | |||
- target: {fileID: 7570006595835424293, guid: 0f97dac5215d69a4795763340d82925d, | |||
type: 3} | |||
propertyPath: m_LocalRotation.x | |||
value: 0 | |||
value: -0 | |||
objectReference: {fileID: 0} | |||
- target: {fileID: 7570006595835424293, guid: 0f97dac5215d69a4795763340d82925d, | |||
type: 3} | |||
propertyPath: m_LocalRotation.y | |||
value: 0 | |||
value: -0 | |||
objectReference: {fileID: 0} | |||
- target: {fileID: 7570006595835424293, guid: 0f97dac5215d69a4795763340d82925d, | |||
type: 3} | |||
propertyPath: m_LocalRotation.z | |||
value: 0 | |||
value: -0 | |||
objectReference: {fileID: 0} | |||
- target: {fileID: 7570006595835424293, guid: 0f97dac5215d69a4795763340d82925d, | |||
type: 3} | |||
@@ -1846,7 +1604,7 @@ PrefabInstance: | |||
- target: {fileID: 7570006595835424293, guid: 0f97dac5215d69a4795763340d82925d, | |||
type: 3} | |||
propertyPath: m_RootOrder | |||
value: 3 | |||
value: 7 | |||
objectReference: {fileID: 0} | |||
- target: {fileID: 7570006595835424293, guid: 0f97dac5215d69a4795763340d82925d, | |||
type: 3} | |||
@@ -1863,6 +1621,45 @@ PrefabInstance: | |||
propertyPath: m_LocalEulerAnglesHint.z | |||
value: 0 | |||
objectReference: {fileID: 0} | |||
- target: {fileID: 7570006596986120125, guid: 0f97dac5215d69a4795763340d82925d, | |||
type: 3} | |||
propertyPath: agentParameters.maxStep | |||
value: 1500 | |||
objectReference: {fileID: 0} | |||
- target: {fileID: 7570006596986120125, guid: 0f97dac5215d69a4795763340d82925d, | |||
type: 3} | |||
propertyPath: timeBetweenDecisionsAtInference | |||
value: 0.04 | |||
objectReference: {fileID: 0} | |||
- target: {fileID: 891713638, guid: 0f97dac5215d69a4795763340d82925d, type: 3} | |||
propertyPath: m_TagString | |||
value: Untagged | |||
objectReference: {fileID: 0} | |||
- target: {fileID: 891713638, guid: 0f97dac5215d69a4795763340d82925d, type: 3} | |||
propertyPath: m_IsActive | |||
value: 1 | |||
objectReference: {fileID: 0} | |||
- target: {fileID: 891713640, guid: 0f97dac5215d69a4795763340d82925d, type: 3} | |||
propertyPath: m_Enabled | |||
value: 0 | |||
objectReference: {fileID: 0} | |||
- target: {fileID: 891713641, guid: 0f97dac5215d69a4795763340d82925d, type: 3} | |||
propertyPath: processedImageRenderer | |||
value: | |||
objectReference: {fileID: 1863707383} | |||
- target: {fileID: 891713641, guid: 0f97dac5215d69a4795763340d82925d, type: 3} | |||
propertyPath: processedImageRendererCropped | |||
value: | |||
objectReference: {fileID: 712179489} | |||
- target: {fileID: 589453881, guid: 0f97dac5215d69a4795763340d82925d, type: 3} | |||
propertyPath: m_IsActive | |||
value: 1 | |||
objectReference: {fileID: 0} | |||
- target: {fileID: 6829507564963703646, guid: 0f97dac5215d69a4795763340d82925d, | |||
type: 3} | |||
propertyPath: m_Enabled | |||
value: 0 | |||
objectReference: {fileID: 0} | |||
m_RemovedComponents: [] | |||
m_SourcePrefab: {fileID: 100100000, guid: 0f97dac5215d69a4795763340d82925d, type: 3} | |||
--- !u!1 &7570006596986120123 stripped | |||
@@ -1877,97 +1674,3 @@ Transform: | |||
type: 3} | |||
m_PrefabInstance: {fileID: 7570006596986120122} | |||
m_PrefabAsset: {fileID: 0} | |||
--- !u!114 &7570006596986120125 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 7570006596986120123} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: 234fd6e10ef55ad4b82b3153890ab5d9, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
brain: {fileID: 11400000, guid: 0d9d5ce547064a648b466ad7f208cf3d, type: 2} | |||
agentParameters: | |||
agentCameras: [] | |||
agentRenderTextures: | |||
- {fileID: 8400000, guid: 8bf12f4401860c043a77209428e97b29, type: 2} | |||
maxStep: 5000 | |||
resetOnDone: 1 | |||
onDemandDecision: 1 | |||
numberOfActionsBetweenDecisions: 1 | |||
renderCamera: {fileID: 891713640} | |||
movementController: {fileID: 7570006596986120130} | |||
timeBetweenDecisionsAtInference: 0.15 | |||
--- !u!65 &7570006596986120126 | |||
BoxCollider: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 7570006596986120123} | |||
m_Material: {fileID: 0} | |||
m_IsTrigger: 0 | |||
m_Enabled: 1 | |||
serializedVersion: 2 | |||
m_Size: {x: 0.05, y: 0.07, z: 0.08} | |||
m_Center: {x: 0, y: 0.035, z: 0} | |||
--- !u!54 &7570006596986120127 | |||
Rigidbody: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 7570006596986120123} | |||
serializedVersion: 2 | |||
m_Mass: 1 | |||
m_Drag: 0 | |||
m_AngularDrag: 0.05 | |||
m_UseGravity: 1 | |||
m_IsKinematic: 0 | |||
m_Interpolate: 0 | |||
m_Constraints: 84 | |||
m_CollisionDetection: 0 | |||
--- !u!114 &7570006596986120128 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 7570006596986120123} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: d2056048a78a0cc4c97e7899ba1c0e31, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_Speed: 0.0535 | |||
m_TurnSpeed: 55 | |||
--- !u!114 &7570006596986120129 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 7570006596986120123} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: 4265d0764c65d26409f0f920e5293c82, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
testState: 1 | |||
isTesting: 0 | |||
--- !u!114 &7570006596986120130 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 7570006596986120123} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: d3ecda30187828846b48edbee97aebd7, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
currentMovementState: 0 |
@@ -27,6 +27,9 @@ public class CozmoAgent : Agent | |||
private ImageProcessor imageProcessor; // reference to the ImageProcessor | |||
private int nearAreaLimit = 0; // X coordinate limit for the near to the imagecenter area | |||
private int centerOfImageX = 0; // Middle of the image in x direction | |||
private MovementState lastChosenMovement = MovementState.Stop; // The last action/movement that was executed | |||
private double startTime = Time.time; | |||
private void Start() | |||
{ | |||
@@ -43,9 +46,46 @@ public class CozmoAgent : Agent | |||
} | |||
public override void CollectObservations() | |||
{ | |||
SetMask(); | |||
} | |||
// Set ActionMask for training | |||
private void SetMask() | |||
{ | |||
switch (lastChosenMovement) | |||
{ | |||
// Do not allow stop decision after a stop | |||
case (MovementState.Stop): | |||
SetActionMask(STOP); | |||
break; | |||
// Do not allow stop after forward | |||
case (MovementState.Forward): | |||
SetActionMask(STOP); | |||
break; | |||
// Do not allow stop & left after right | |||
case (MovementState.Right): | |||
SetActionMask(STOP); | |||
SetActionMask(LEFT); | |||
break; | |||
// Do not allow stop & right after left | |||
case (MovementState.Left): | |||
SetActionMask(STOP); | |||
SetActionMask(RIGHT); | |||
break; | |||
default: | |||
throw new ArgumentException("Invalid MovementState."); | |||
} | |||
} | |||
// to be implemented by the developer | |||
public override void AgentAction(float[] vectorAction, string textAction) | |||
{ | |||
double elapsedTime = Time.time - startTime; | |||
print("Elapsed time: " + elapsedTime); | |||
startTime = Time.time; | |||
int action = Mathf.FloorToInt(vectorAction[0]); | |||
Point centerOfGravity = imageProcessor.CenterOfGravity; | |||
@@ -55,15 +95,27 @@ public class CozmoAgent : Agent | |||
{ | |||
case STOP: | |||
movementController.currentMovementState = MovementState.Stop; | |||
lastChosenMovement = MovementState.Stop; | |||
//Test | |||
SetReward(-0.1f); | |||
break; | |||
case FORWARD: | |||
movementController.currentMovementState = MovementState.Forward; | |||
lastChosenMovement = MovementState.Forward; | |||
//Test | |||
SetReward(0.01f); | |||
break; | |||
case RIGHT: | |||
movementController.currentMovementState = MovementState.Right; | |||
lastChosenMovement = MovementState.Right; | |||
//Test | |||
SetReward(-0.02f); | |||
break; | |||
case LEFT: | |||
movementController.currentMovementState = MovementState.Left; | |||
lastChosenMovement = MovementState.Left; | |||
//Test | |||
SetReward(-0.02f); | |||
break; | |||
default: | |||
//movement.Move(0); | |||
@@ -86,36 +138,43 @@ public class CozmoAgent : Agent | |||
float reward = 0; | |||
// Center of gravity is far away from the center (left) | |||
if (centerOfGravityX <= centerOfImageX - nearAreaLimit) | |||
if (centerOfGravityX <= centerOfImageX - nearAreaLimit && centerOfGravityX >= 0) | |||
{ | |||
float range = centerOfImageX - nearAreaLimit; | |||
reward = -(1 - (centerOfGravityX / range)); | |||
// Clamp the reward to max -1 in order to handle rewards if the center of gravity is outside of the image | |||
reward = Mathf.Clamp(reward, -1, 0); | |||
reward = Mathf.Clamp(reward, -1, 0) / 2; | |||
} | |||
// Center of gravity is near left of the center | |||
else if (centerOfGravityX <= centerOfImageX) | |||
else if ((centerOfGravityX <= centerOfImageX) && (centerOfGravityX >= (centerOfImageX - nearAreaLimit))) | |||
{ | |||
float range = centerOfImageX - (centerOfImageX - nearAreaLimit); | |||
float distanceToLeftFarBorder = centerOfGravityX - (centerOfImageX - nearAreaLimit); | |||
reward = (distanceToLeftFarBorder / range); | |||
} | |||
// Center of gravity is far away from the center (right) | |||
else if (centerOfGravityX >= centerOfImageX + nearAreaLimit) | |||
else if ((centerOfGravityX >= (centerOfImageX + nearAreaLimit)) && (centerOfGravityX <= renderCamera.targetTexture.width)) | |||
{ | |||
float range = renderCamera.targetTexture.width - (centerOfImageX + nearAreaLimit); | |||
reward = -(((centerOfGravityX - (centerOfImageX + nearAreaLimit)) / range)); | |||
// Clamp the reward to max -1 in order to handle rewards if the center of gravity is outside of the image | |||
reward = Mathf.Clamp(reward, -1, 0); | |||
reward = Mathf.Clamp(reward, -1, 0) / 2; | |||
} | |||
// Center of gravity is near right of the center | |||
else if (centerOfGravityX >= centerOfImageX) | |||
else if ((centerOfGravityX >= centerOfImageX) && (centerOfGravityX <= (centerOfImageX + nearAreaLimit))) | |||
{ | |||
float range = (centerOfImageX + nearAreaLimit) - centerOfImageX; | |||
float distanceToCenterOfImage = centerOfGravityX - centerOfImageX; | |||
reward = (1 - distanceToCenterOfImage / range); | |||
} | |||
else | |||
{ | |||
SetReward(-1); | |||
AgentReset(); | |||
Debug.Log("Out of image range"); | |||
} | |||
Debug.Log("Reward: " + reward); | |||
SetReward(reward); | |||
} | |||
@@ -6,7 +6,7 @@ RenderTexture: | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_Name: CozmoCannyCroped | |||
m_Name: CozmoCannyCroped_0 | |||
m_ImageContentsHash: | |||
serializedVersion: 2 | |||
Hash: 00000000000000000000000000000000 |
@@ -6,14 +6,14 @@ RenderTexture: | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_Name: TestVisualBanana | |||
m_Name: CozmoCannyCroped_1 | |||
m_ImageContentsHash: | |||
serializedVersion: 2 | |||
Hash: 00000000000000000000000000000000 | |||
m_ForcedFallbackFormat: 4 | |||
m_DownscaleFallback: 0 | |||
m_Width: 256 | |||
m_Height: 256 | |||
m_Width: 80 | |||
m_Height: 30 | |||
m_AntiAliasing: 1 | |||
m_DepthFormat: 2 | |||
m_ColorFormat: 0 |
@@ -1,5 +1,5 @@ | |||
fileFormatVersion: 2 | |||
guid: 7cf95f69a56a16641b7419b518ba13ff | |||
guid: c2570513b195a074d9ddc7c75b245858 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 8400000 |
@@ -6,7 +6,7 @@ RenderTexture: | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_Name: CozmoCannyTexture | |||
m_Name: CozmoCannyTexture_0 | |||
m_ImageContentsHash: | |||
serializedVersion: 2 | |||
Hash: 00000000000000000000000000000000 |
@@ -0,0 +1,34 @@ | |||
%YAML 1.1 | |||
%TAG !u! tag:unity3d.com,2011: | |||
--- !u!84 &8400000 | |||
RenderTexture: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_Name: CozmoCannyTexture_1 | |||
m_ImageContentsHash: | |||
serializedVersion: 2 | |||
Hash: 00000000000000000000000000000000 | |||
m_ForcedFallbackFormat: 4 | |||
m_DownscaleFallback: 0 | |||
m_Width: 320 | |||
m_Height: 240 | |||
m_AntiAliasing: 1 | |||
m_DepthFormat: 2 | |||
m_ColorFormat: 0 | |||
m_MipMap: 0 | |||
m_GenerateMips: 1 | |||
m_SRGB: 0 | |||
m_UseDynamicScale: 0 | |||
m_BindMS: 0 | |||
m_TextureSettings: | |||
serializedVersion: 2 | |||
m_FilterMode: 1 | |||
m_Aniso: 0 | |||
m_MipBias: 0 | |||
m_WrapU: 1 | |||
m_WrapV: 1 | |||
m_WrapW: 1 | |||
m_Dimension: 2 | |||
m_VolumeDepth: 1 |
@@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 55aff4f34c0a7134eae7f9be35397deb | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 8400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
@@ -8,7 +8,7 @@ default: | |||
hidden_units: 128 | |||
lambd: 0.95 | |||
learning_rate: 3.0e-4 | |||
max_steps: 5.0e4 | |||
max_steps: 50.0e4 | |||
memory_size: 256 | |||
normalize: false | |||
num_epoch: 3 |
@@ -4,7 +4,7 @@ | |||
QualitySettings: | |||
m_ObjectHideFlags: 0 | |||
serializedVersion: 5 | |||
m_CurrentQuality: 4 | |||
m_CurrentQuality: 0 | |||
m_QualitySettings: | |||
- serializedVersion: 2 | |||
name: Very Low | |||
@@ -26,7 +26,7 @@ QualitySettings: | |||
softVegetation: 0 | |||
realtimeReflectionProbes: 0 | |||
billboardsFaceCameraPosition: 0 | |||
vSyncCount: 0 | |||
vSyncCount: 1 | |||
lodBias: 0.3 | |||
maximumLODLevel: 0 | |||
streamingMipmapsActive: 0 | |||
@@ -222,7 +222,7 @@ QualitySettings: | |||
Nintendo Switch: 5 | |||
PS4: 5 | |||
PSP2: 2 | |||
Standalone: 5 | |||
Standalone: 0 | |||
Tizen: 2 | |||
WebGL: 3 | |||
WiiU: 5 |
@@ -0,0 +1,6 @@ | |||
{ | |||
"cells": [], | |||
"metadata": {}, | |||
"nbformat": 4, | |||
"nbformat_minor": 2 | |||
} |
@@ -0,0 +1,79 @@ | |||
{ | |||
"cells": [ | |||
{ | |||
"cell_type": "code", | |||
"execution_count": 33, | |||
"metadata": {}, | |||
"outputs": [ | |||
{ | |||
"name": "stdout", | |||
"output_type": "stream", | |||
"text": [ | |||
"[0 1]\n", | |||
"[1 0]\n" | |||
] | |||
} | |||
], | |||
"source": [ | |||
"import numpy as np\n", | |||
"\n", | |||
"y_out = [[[-0.52742714, -0.8918941 , -0.53989583, -0.874211 ]]]\n", | |||
"\n", | |||
"outputs = y_out[0][0]\n", | |||
"\n", | |||
"prob_action1 = outputs[:2]\n", | |||
"prob_action2 = outputs[2:]\n", | |||
"\n", | |||
"norm_action1 = [float(i)/sum(prob_action1) for i in prob_action1]\n", | |||
"norm_action2 = [float(i)/sum(prob_action2) for i in prob_action2]\n", | |||
"\n", | |||
"action1 = np.random.multinomial(1,norm_action1)\n", | |||
"action2 = np.random.multinomial(1,norm_action2)\n", | |||
"print(action1)\n", | |||
"print(action2)" | |||
] | |||
}, | |||
{ | |||
"cell_type": "code", | |||
"execution_count": null, | |||
"metadata": {}, | |||
"outputs": [], | |||
"source": [] | |||
}, | |||
{ | |||
"cell_type": "code", | |||
"execution_count": null, | |||
"metadata": {}, | |||
"outputs": [], | |||
"source": [] | |||
}, | |||
{ | |||
"cell_type": "code", | |||
"execution_count": null, | |||
"metadata": {}, | |||
"outputs": [], | |||
"source": [] | |||
} | |||
], | |||
"metadata": { | |||
"kernelspec": { | |||
"display_name": "Python 3", | |||
"language": "python", | |||
"name": "python3" | |||
}, | |||
"language_info": { | |||
"codemirror_mode": { | |||
"name": "ipython", | |||
"version": 3 | |||
}, | |||
"file_extension": ".py", | |||
"mimetype": "text/x-python", | |||
"name": "python", | |||
"nbconvert_exporter": "python", | |||
"pygments_lexer": "ipython3", | |||
"version": "3.6.7" | |||
} | |||
}, | |||
"nbformat": 4, | |||
"nbformat_minor": 2 | |||
} |