Commit ·
aaef972
1
Parent(s): f71cab6
Upload . with huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- addons/godot_rl_agents/controller/ai_controller.gdAdded+77
- addons/godot_rl_agents/controller/ai_controller_2d.gdAdded+8
- addons/godot_rl_agents/controller/ai_controller_3d.gdAdded+8
- addons/godot_rl_agents/icon.png.import+2-2
- addons/godot_rl_agents/onnx/csharp/ONNXInference.csAdded+93
- addons/godot_rl_agents/onnx/csharp/SessionConfigurator.csAdded+106
- addons/godot_rl_agents/onnx/csharp/docs/ONNXInference.xmlAdded+31
- addons/godot_rl_agents/onnx/csharp/docs/SessionConfigurator.xmlAdded+29
- addons/godot_rl_agents/onnx/wrapper/ONNX_wrapper.gdAdded+19
- addons/godot_rl_agents/sensors/sensors_2d/ExampleRaycastSensor2D.tscn+11-11
- addons/godot_rl_agents/sensors/sensors_2d/ISensor2D.gd+1-1
- addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.gd+31-7
- addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.tscn+4-3
- addons/godot_rl_agents/sensors/sensors_3d/ISensor3D.gd+1-1
- addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.gd+8-8
- addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.tscn+26-42
- addons/godot_rl_agents/sync.gd+119-78
- assets/prototype_textures/PNG/Dark/texture_01.png.import+3-4
- assets/prototype_textures/PNG/Dark/texture_02.png.import+3-4
- assets/prototype_textures/PNG/Dark/texture_03.png.import+1-1
- assets/prototype_textures/PNG/Dark/texture_04.png.import+1-1
- assets/prototype_textures/PNG/Dark/texture_05.png.import+1-1
- assets/prototype_textures/PNG/Dark/texture_06.png.import+1-1
- assets/prototype_textures/PNG/Dark/texture_07.png.import+1-1
- assets/prototype_textures/PNG/Dark/texture_08.png.import+1-1
- assets/prototype_textures/PNG/Dark/texture_09.png.import+1-1
- assets/prototype_textures/PNG/Dark/texture_10.png.import+1-1
- assets/prototype_textures/PNG/Dark/texture_11.png.import+1-1
- assets/prototype_textures/PNG/Dark/texture_12.png.import+1-1
- assets/prototype_textures/PNG/Dark/texture_13.png.import+3-4
- assets/prototype_textures/PNG/Green/texture_01.png.import+3-4
- assets/prototype_textures/PNG/Green/texture_02.png.import+1-1
- assets/prototype_textures/PNG/Green/texture_03.png.import+1-1
- assets/prototype_textures/PNG/Green/texture_04.png.import+1-1
- assets/prototype_textures/PNG/Green/texture_05.png.import+1-1
- assets/prototype_textures/PNG/Green/texture_06.png.import+1-1
- assets/prototype_textures/PNG/Green/texture_07.png.import+1-1
- assets/prototype_textures/PNG/Green/texture_08.png.import+1-1
- assets/prototype_textures/PNG/Green/texture_09.png.import+1-1
- assets/prototype_textures/PNG/Green/texture_10.png.import+1-1
- assets/prototype_textures/PNG/Green/texture_11.png.import+1-1
- assets/prototype_textures/PNG/Green/texture_12.png.import+1-1
- assets/prototype_textures/PNG/Green/texture_13.png.import+1-1
- assets/prototype_textures/PNG/Light/texture_01.png.import+1-1
- assets/prototype_textures/PNG/Light/texture_02.png.import+1-1
- assets/prototype_textures/PNG/Light/texture_03.png.import+1-1
- assets/prototype_textures/PNG/Light/texture_04.png.import+1-1
- assets/prototype_textures/PNG/Light/texture_05.png.import+1-1
- assets/prototype_textures/PNG/Light/texture_06.png.import+1-1
- assets/prototype_textures/PNG/Light/texture_07.png.import+1-1
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677extends Nodeclass_name AIController
# ------------------ Godot RL Agents Logic ------------------------------------#@export var reset_after := 1000
var heuristic := "human"var done := falsevar reward := 0.0var n_steps := 0
var needs_reset := false
func _ready(): add_to_group("AGENT") #-- Methods that need implementing using the "extend script" option in Godot --#func get_obs() -> Dictionary: assert(false, "the get_obs method is not implemented when extending from ai_controller") return {"obs":[]}
func get_reward() -> float: assert(false, "the get_reward method is not implemented when extending from ai_controller") return 0.0 func get_action_space() -> Dictionary: assert(false, "the get get_action_space method is not implemented when extending from ai_controller") return { "example_actions_continous" : { "size": 2, "action_type": "continuous" }, "example_actions_discrete" : { "size": 2, "action_type": "discrete" }, } func set_action(action) -> void: assert(false, "the get set_action method is not implemented when extending from ai_controller") # -----------------------------------------------------------------------------# func _physics_process(delta): n_steps += 1 if n_steps > reset_after: needs_reset = true func get_obs_space(): # may need overriding if the obs space is complex var obs = get_obs() return { "obs": { "size": [len(obs["obs"])], "space": "box" }, }
func reset(): n_steps = 0 needs_reset = false
func reset_if_done(): if done: reset() func set_heuristic(h): # sets the heuristic from "human" or "model" nothing to change here heuristic = h
func get_done(): return done func set_done_false(): done = false
func zero_reward(): reward = 0.012345678extends AIControllerclass_name AIController2D
# ------------------ Godot RL Agents Logic ------------------------------------#var _player: Node2D
func init(player: Node2D): _player = player12345678extends AIControllerclass_name AIController3D
# ------------------ Godot RL Agents Logic ------------------------------------#var _player: Node3D
func init(player: Node3D): _player = player1 unmodified line23456787 unmodified lines1617181920212223241 unmodified lineimporter="texture"type="CompressedTexture2D"uid="uid://b7lwg3uk8v3pr"path="res://.godot/imported/icon.png-45a871b53434e556222f5901d598ab34.ctex"metadata={"vram_texture": false7 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false1 unmodified line23456787 unmodified lines1617181920212223241 unmodified lineimporter="texture"type="CompressedTexture2D"uid="uid://dn7mfntm1bfv4"path="res://.godot/imported/icon.png-45a871b53434e556222f5901d598ab34.ctex"metadata={"vram_texture": false7 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293using Godot;using System.Collections.Generic;using System.Linq;using Microsoft.ML.OnnxRuntime;using Microsoft.ML.OnnxRuntime.Tensors;
namespace GodotONNX{ /// <include file='docs/ONNXInference.xml' path='docs/members[@name="ONNXInference"]/ONNXInference/*'/> public partial class ONNXInference : Node{ private InferenceSession session; /// <summary> /// Path to the ONNX model. Use Initialize to change it. /// </summary> private string modelPath; private int batchSize;
private SessionOptions SessionOpt;
//init function/// <include file='docs/ONNXInference.xml' path='docs/members[@name="ONNXInference"]/Initialize/*'/> public void Initialize(string Path, int BatchSize) { modelPath = Path; batchSize = BatchSize; SessionConfigurator.SystemCheck(); SessionOpt = SessionConfigurator.GetSessionOptions(); session = LoadModel(modelPath);
}/// <include file='docs/ONNXInference.xml' path='docs/members[@name="ONNXInference"]/Run/*'/> public Godot.Collections.Dictionary<string, Godot.Collections.Array<float>> RunInference(Godot.Collections.Array<float> obs, int state_ins) { //Current model: Any (Godot Rl Agents) //Expects a tensor of shape [batch_size, input_size] type float named obs and a tensor of shape [batch_size] type float named state_ins //Fill the input tensors // create span from inputSize var span = new float[obs.Count]; //There's probably a better way to do this for (int i = 0; i < obs.Count; i++) { span[i] = obs[i]; } IReadOnlyCollection<NamedOnnxValue> inputs = new List<NamedOnnxValue> { NamedOnnxValue.CreateFromTensor("obs", new DenseTensor<float>(span, new int[] { batchSize, obs.Count })), NamedOnnxValue.CreateFromTensor("state_ins", new DenseTensor<float>(new float[] { state_ins }, new int[] { batchSize })) }; IReadOnlyCollection<string> outputNames = new List<string> { "output", "state_outs" }; //ONNX is sensible to these names, as well as the input names
IDisposableReadOnlyCollection<DisposableNamedOnnxValue> results; try{ results = session.Run(inputs, outputNames); } catch (OnnxRuntimeException e) { //This error usually means that the model is not compatible with the input, beacause of the input shape (size) GD.Print("Error at inference: ", e); return null; } //Can't convert IEnumerable<float> to Variant, so we have to convert it to an array or something Godot.Collections.Dictionary<string, Godot.Collections.Array<float>> output = new Godot.Collections.Dictionary<string, Godot.Collections.Array<float>>(); DisposableNamedOnnxValue output1 = results.First(); DisposableNamedOnnxValue output2 = results.Last(); Godot.Collections.Array<float> output1Array = new Godot.Collections.Array<float>(); Godot.Collections.Array<float> output2Array = new Godot.Collections.Array<float>();
foreach (float f in output1.AsEnumerable<float>()) { output1Array.Add(f); }
foreach (float f in output2.AsEnumerable<float>()) { output2Array.Add(f); }
output.Add(output1.Name, output1Array); output.Add(output2.Name, output2Array); //Output is a dictionary of arrays, ex: { "output" : [0.1, 0.2, 0.3, 0.4, ...], "state_outs" : [0.5, ...]} return output; } /// <include file='docs/ONNXInference.xml' path='docs/members[@name="ONNXInference"]/Load/*'/> public InferenceSession LoadModel(string Path) { Godot.FileAccess file = FileAccess.Open(Path, Godot.FileAccess.ModeFlags.Read); byte[] model = file.GetBuffer((int)file.GetLength()); file.Close(); return new InferenceSession(model, SessionOpt); //Load the model } }} 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106using Godot;using Microsoft.ML.OnnxRuntime;
namespace GodotONNX{/// <include file='docs/SessionConfigurator.xml' path='docs/members[@name="SessionConfigurator"]/SessionConfigurator/*'/>
public static class SessionConfigurator {
private static SessionOptions options = new SessionOptions(); /// <include file='docs/SessionConfigurator.xml' path='docs/members[@name="SessionConfigurator"]/GetSessionOptions/*'/> public static SessionOptions GetSessionOptions() { options = new SessionOptions(); options.LogSeverityLevel = OrtLoggingLevel.ORT_LOGGING_LEVEL_WARNING; // see warnings SystemCheck(); return options; }/// <include file='docs/SessionConfigurator.xml' path='docs/members[@name="SessionConfigurator"]/SystemCheck/*'/>
static public void SystemCheck() { //Most code for this function is verbose only, the only reason it exists is to track //implementation progress of the different compute APIs.
//December 2022: CUDA is not working.
string OSName = OS.GetName(); //Get OS Name int ComputeAPIID = ComputeCheck(); //Get Compute API //TODO: Get CPU architecture
//Linux can use OpenVINO (C#) on x64 and ROCm on x86 (GDNative/C++) //Windows can use OpenVINO (C#) on x64 //TODO: try TensorRT instead of CUDA //TODO: Use OpenVINO for Intel Graphics string [] ComputeNames = {"CUDA", "DirectML/ROCm", "DirectML", "CoreML", "CPU"}; //match OS and Compute API options.AppendExecutionProvider_CPU(0); // Always use CPU GD.Print("OS: " + OSName, " | Compute API: " + ComputeNames[ComputeAPIID]);
switch (OSName) { case "Windows": //Can use CUDA, DirectML if (ComputeAPIID == 0) { //CUDA //options.AppendExecutionProvider_CUDA(0); options.AppendExecutionProvider_DML(0); } else if (ComputeAPIID == 1) { //DirectML options.AppendExecutionProvider_DML(0); } break; case "X11": //Can use CUDA, ROCm if (ComputeAPIID == 0) { //CUDA //options.AppendExecutionProvider_CUDA(0); } if (ComputeAPIID == 1) { //ROCm, only works on x86 //Research indicates that this has to be compiled as a GDNative plugin GD.Print("ROCm not supported yet, using CPU."); options.AppendExecutionProvider_CPU(0); } break; case "OSX": //Can use CoreML if (ComputeAPIID == 0) { //CoreML //TODO: Needs testing options.AppendExecutionProvider_CoreML(0); //CoreML on ARM64, out of the box, on x64 needs .tar file from GitHub } break; default: GD.Print("OS not Supported."); break; } }/// <include file='docs/SessionConfigurator.xml' path='docs/members[@name="SessionConfigurator"]/ComputeCheck/*'/>
public static int ComputeCheck() { string adapterName = Godot.RenderingServer.GetVideoAdapterName(); //string adapterVendor = Godot.RenderingServer.GetVideoAdapterVendor(); adapterName = adapterName.ToUpper(new System.Globalization.CultureInfo("")); //TODO: GPU vendors for MacOS, what do they even use these days? if (adapterName.Contains("INTEL")) { //Return 2, should use DirectML only return 2;} if (adapterName.Contains("AMD")) { //Return 1, should use DirectML, check later for ROCm return 1;} if (adapterName.Contains("NVIDIA")){ //Return 0, should use CUDA return 0;} GD.Print("Graphics Card not recognized."); //Return -1, should use CPU return -1; } }} 12345678910111213141516171819202122232425262728293031<docs> <members name="ONNXInference"> <ONNXInference> <summary> The main <c>ONNXInference</c> Class that handles the inference process. </summary> </ONNXInference> <Initialize> <summary> Starts the inference process. </summary> <param name="Path">Path to the ONNX model, expects a path inside resources.</param> <param name="BatchSize">How many observations will the model recieve.</param> </Initialize> <Run> <summary> Runs the given input through the model and returns the output. </summary> <param name="obs">Dictionary containing all observations.</param> <param name="state_ins">How many different agents are creating these observations.</param> <returns>A Dictionary of arrays, containing instructions based on the observations.</returns> </Run> <Load> <summary> Loads the given model into the inference process, using the best Execution provider available. </summary> <param name="Path">Path to the ONNX model, expects a path inside resources.</param> <returns>InferenceSession ready to run.</returns> </Load> </members></docs>1234567891011121314151617181920212223242526272829<docs> <members name="SessionConfigurator"> <SessionConfigurator> <summary> The main <c>SessionConfigurator</c> Class that handles the execution options and providers for the inference process. </summary> </SessionConfigurator> <GetSessionOptions> <summary> Creates a SessionOptions with all available execution providers. </summary> <returns>SessionOptions with all available execution providers.</returns> </GetSessionOptions> <SystemCheck> <summary> Appends any execution provider available in the current system. </summary> <remarks> This function is mainly verbose for tracking implementation progress of different compute APIs. </remarks> </SystemCheck> <ComputeCheck> <summary> Checks for available GPUs. </summary> <returns>An integer identifier for each compute platform.</returns> </ComputeCheck> </members></docs>12345678910111213141516171819extends Nodeclass_name ONNXModelvar inferencer_script = load("res://addons/godot_rl_agents/onnx/csharp/ONNXInference.cs")
var inferencer = null
# Must provide the path to the model and the batch sizefunc _init(model_path, batch_size): inferencer = inferencer_script.new() inferencer.Initialize(model_path, batch_size)
# This function is the one that will be called from the game, # requires the observation as an array and the state_ins as an int# returns an Array containing the action the model takes. func run_inference(obs : Array, state_ins : int) -> Dictionary: if inferencer == null: printerr("Inferencer not initialized") return {} return inferencer.RunInference(obs, state_ins)123456783 unmodified lines121314151617187 unmodified lines2627282930313233343536373839404142434445464748[gd_scene load_steps=5 format=2][ext_resource path="res://sensors/sensors_2d/RaycastSensor2D.gd" type="Script" id=1][sub_resource type="GDScript" id=2]script/source = "extends Node2D3 unmodified lines"[sub_resource type="GDScript" id=1]script/source = "extends RayCast2Dvar steps = 17 unmodified linesprint(is_colliding())"[sub_resource type="CircleShape2D" id=3][node name="ExampleRaycastSensor2D" type="Node2D"]script = SubResource( 2 )[node name="ExampleAgent" type="Node2D" parent="."]position = Vector2( 573, 314 )rotation = 0.286234[node name="RaycastSensor2D" type="Node2D" parent="ExampleAgent"]script = ExtResource( 1 )[node name="TestRayCast2D" type="RayCast2D" parent="."]script = SubResource( 1 )[node name="StaticBody2D" type="StaticBody2D" parent="."]position = Vector2( 1, 52 )[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]shape = SubResource( 3 )123456783 unmodified lines121314151617187 unmodified lines2627282930313233343536373839404142434445464748[gd_scene load_steps=5 format=3 uid="uid://ddeq7mn1ealyc"][ext_resource type="Script" path="res://sensors/sensors_2d/RaycastSensor2D.gd" id="1"][sub_resource type="GDScript" id="2"]script/source = "extends Node2D3 unmodified lines"[sub_resource type="GDScript" id="1"]script/source = "extends RayCast2Dvar steps = 17 unmodified linesprint(is_colliding())"[sub_resource type="CircleShape2D" id="3"][node name="ExampleRaycastSensor2D" type="Node2D"]script = SubResource("2")[node name="ExampleAgent" type="Node2D" parent="."]position = Vector2(573, 314)rotation = 0.286234[node name="RaycastSensor2D" type="Node2D" parent="ExampleAgent"]script = ExtResource("1")[node name="TestRayCast2D" type="RayCast2D" parent="."]script = SubResource("1")[node name="StaticBody2D" type="StaticBody2D" parent="."]position = Vector2(1, 52)[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]shape = SubResource("3")
1234567extends Node2Dclass_name ISensor2Dvar _obs : Arrayvar _active := falsefunc get_observation():1234567extends Node2Dclass_name ISensor2Dvar _obs : Array = []var _active := falsefunc get_observation():
1234561 unmodified line89101112131415161718192021222324255 unmodified lines31323334353637383940414212 unmodified lines55565758596061extends ISensor2Dclass_name RaycastSensor2D@tool@export var n_rays := 16.0:get: return n_rays1 unmodified linen_rays = value_update()@export var ray_length := 200:# (float,5,200,5.0)get: return ray_lengthset(value):ray_length = value_update()@export var cone_width := 360.0:# (float,5,360,5.0)get: return cone_widthset(value):cone_width = value_update()@export var debug_draw := false :get: return debug_drawset(value):debug_draw = value5 unmodified linesfunc _update():if Engine.is_editor_hint():_spawn_nodes()func _ready() -> void:_spawn_nodes()func _spawn_nodes():for ray in rays:ray.queue_free()12 unmodified lines))ray.set_name("node_"+str(i))ray.enabled = trueray.collide_with_areas = trueadd_child(ray)rays.append(ray)1234567891011121314151617181920212223241 unmodified line2627282930313233343536373839404142435 unmodified lines4950515253545556575859606162636412 unmodified lines777879808182838485@toolextends ISensor2Dclass_name RaycastSensor2D@export_flags_2d_physics var collision_mask := 1:get: return collision_maskset(value):collision_mask = value_update()@export var collide_with_areas := false:get: return collide_with_areasset(value):collide_with_areas = value_update()@export var collide_with_bodies := true:get: return collide_with_bodiesset(value):collide_with_bodies = value_update()@export var n_rays := 16.0:get: return n_rays1 unmodified linen_rays = value_update()@export_range(5,200,5.0) var ray_length := 200:get: return ray_lengthset(value):ray_length = value_update()@export_range(5,360,5.0) var cone_width := 360.0:get: return cone_widthset(value):cone_width = value_update()@export var debug_draw := true :get: return debug_drawset(value):debug_draw = value5 unmodified linesfunc _update():if Engine.is_editor_hint():if debug_draw:_spawn_nodes()else:for ray in get_children():if ray is RayCast2D:remove_child(ray)func _ready() -> void:_spawn_nodes()func _spawn_nodes():for ray in rays:ray.queue_free()12 unmodified lines))ray.set_name("node_"+str(i))ray.enabled = trueray.collide_with_areas = collide_with_areasray.collide_with_bodies = collide_with_bodiesray.collision_mask = collision_maskadd_child(ray)rays.append(ray)
123456[gd_scene load_steps=2 format=2][ext_resource path="res://addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.gd" type="Script" id=1][node name="RaycastSensor2D" type="Node2D"]script = ExtResource( 1 )1234567[gd_scene load_steps=2 format=3 uid="uid://drvfihk5esgmv"][ext_resource type="Script" path="res://addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.gd" id="1"][node name="RaycastSensor2D" type="Node2D"]script = ExtResource("1")n_rays = 17.0
1234567extends Node3Dclass_name ISensor3Dvar _obs : Arrayvar _active := falsefunc get_observation():1234567extends Node3Dclass_name ISensor3Dvar _obs : Array = []var _active := falsefunc get_observation():
1234563 unmodified lines1011121314151625 unmodified lines424344454647484950515253545556575859extends ISensor3Dclass_name RayCastSensor3D@tool@export_flags_3d_physics var collision_mask = 1:get: return collision_maskset(value):3 unmodified linesget: return boolean_class_maskset(value):boolean_class_mask = value_update()@export var n_rays_width := 6.0:get: return n_rays_width25 unmodified linescone_height = value_update()@export var collide_with_bodies := true:get: return collide_with_bodiesset(value):collide_with_bodies = value_update()@export var collide_with_areas := false:get: return collide_with_areasset(value):collide_with_areas = value_update()@export var class_sensor := falsevar rays := []1234563 unmodified lines1011121314151625 unmodified lines424344454647484950515253545556575859@toolextends ISensor3Dclass_name RayCastSensor3D@export_flags_3d_physics var collision_mask = 1:get: return collision_maskset(value):3 unmodified linesget: return boolean_class_maskset(value):boolean_class_mask = value_update()@export var n_rays_width := 6.0:get: return n_rays_width25 unmodified linescone_height = value_update()@export var collide_with_areas := false:get: return collide_with_areasset(value):collide_with_areas = value_update()@export var collide_with_bodies := true:get: return collide_with_bodiesset(value):collide_with_bodies = value_update()@export var class_sensor := falsevar rays := []
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849[gd_scene load_steps=2 format=2][ext_resource path="res://addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.gd" type="Script" id=1][node name="RaycastSensor3D" type="Node3D"]script = ExtResource( 1 )n_rays_width = 4.0n_rays_height = 2.0ray_length = 11.0[node name="node_0 2" type="RayCast3D" parent="."]enabled = truecast_to = Vector3( -4.06608, -2.84701, 9.81639 )collide_with_areas = true[node name="node_0 3" type="RayCast3D" parent="."]enabled = truecast_to = Vector3( -4.06608, 2.84701, 9.81639 )collide_with_areas = true[node name="node_1 0" type="RayCast3D" parent="."]enabled = truecast_to = Vector3( -1.38686, -2.84701, 10.5343 )collide_with_areas = true[node name="node_1 1" type="RayCast3D" parent="."]enabled = truecast_to = Vector3( -1.38686, 2.84701, 10.5343 )collide_with_areas = true[node name="node_2 0" type="RayCast3D" parent="."]enabled = truecast_to = Vector3( 1.38686, -2.84701, 10.5343 )collide_with_areas = true[node name="node_2 1" type="RayCast3D" parent="."]enabled = truecast_to = Vector3( 1.38686, 2.84701, 10.5343 )collide_with_areas = true[node name="node_3 0" type="RayCast3D" parent="."]enabled = truecast_to = Vector3( 4.06608, -2.84701, 9.81639 )collide_with_areas = true[node name="node_3 1" type="RayCast3D" parent="."]enabled = truecast_to = Vector3( 4.06608, 2.84701, 9.81639 )collide_with_areas = true123456789101112131415161718192021222324252627282930313233[gd_scene load_steps=2 format=3 uid="uid://b803cbh1fmy66"][ext_resource type="Script" path="res://addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.gd" id="1"][node name="RaycastSensor3D" type="Node3D"]script = ExtResource("1")n_rays_width = 4.0n_rays_height = 2.0ray_length = 11.0[node name="@node_0 0@18991" type="RayCast3D" parent="."]target_position = Vector3(-4.06608, -2.84701, 9.81639)[node name="node_0 1" type="RayCast3D" parent="."]target_position = Vector3(-4.06608, 2.84701, 9.81639)[node name="@node_1 0@18992" type="RayCast3D" parent="."]target_position = Vector3(-1.38686, -2.84701, 10.5343)[node name="@node_1 1@18993" type="RayCast3D" parent="."]target_position = Vector3(-1.38686, 2.84701, 10.5343)[node name="@node_2 0@18994" type="RayCast3D" parent="."]target_position = Vector3(1.38686, -2.84701, 10.5343)[node name="@node_2 1@18995" type="RayCast3D" parent="."]target_position = Vector3(1.38686, 2.84701, 10.5343)[node name="@node_3 0@18996" type="RayCast3D" parent="."]target_position = Vector3(4.06608, -2.84701, 9.81639)[node name="@node_3 1@18997" type="RayCast3D" parent="."]target_position = Vector3(4.06608, 2.84701, 9.81639)
1 unmodified line23456787 unmodified lines16171819202122232425262728293031323334353638 unmodified lines75767778798081828384858687888990916 unmodified lines989910010110210310410510610710810911011111211311424 unmodified lines13914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720863 unmodified lines27227327427527627715 unmodified lines2932942951 unmodified line# --fixed-fps 2000 --disable-render-loop@export var action_repeat := 8@export var speed_up = 1var n_action_steps = 0const MAJOR_VERSION := "0"const MINOR_VERSION := "3"7 unmodified linesvar agentsvar need_to_send_obs = falsevar args = null@onready var start_time = Time.get_ticks_msec()var initialized = falsevar just_reset = false# Called when the node enters the scene tree for the first time.func _ready():await get_tree().root.readyget_tree().set_pause(true)_initialize()await get_tree().create_timer(1.0).timeoutget_tree().set_pause(false)func _get_agents():agents = get_tree().get_nodes_in_group("AGENT")38 unmodified linesfunc _send_env_info():var json_dict = _get_dict_json_message()assert(json_dict["type"] == "env_info")var message = {"type" : "env_info",#"obs_size": agents[0].get_obs_size(),"observation_space": agents[0].get_obs_space(),"action_space":agents[0].get_action_space(),"n_agents": len(agents)}_send_dict_as_json_message(message)func connect_to_server():print("Waiting for one second to allow server to start")OS.delay_msec(1000)6 unmodified linesvar connect = stream.connect_to_host(ip, port)stream.set_no_delay(true) # TODO check if this improves performance or notstream.poll()return stream.get_status() == 2func _get_args():print("getting command line arguments")# var arguments = {}# for argument in OS.get_cmdline_args():# # Parse valid command-line arguments into a dictionary# if argument.find("=") > -1:# var key_value = argument.split("=")# arguments[key_value[0].lstrip("--")] = key_value[1]var arguments = {}for argument in OS.get_cmdline_args():print(argument)24 unmodified linesfunc disconnect_from_server():stream.disconnect_from_host()func _initialize():_get_agents()args = _get_args()Engine.physics_ticks_per_second = _get_speedup() * 60 # Replace with function body.Engine.time_scale = _get_speedup() * 1.0prints("physics ticks", Engine.physics_ticks_per_second, Engine.time_scale, _get_speedup(), speed_up)connected = connect_to_server()if connected:_set_heuristic("model")_handshake()_send_env_info()else:_set_heuristic("human")_set_seed()_set_action_repeat()initialized = truefunc _physics_process(delta):# two modes, human control, agent control# pause tree, send obs, get actions, set actions, unpause treeif n_action_steps % action_repeat != 0:n_action_steps += 1returnn_action_steps += 1if connected:get_tree().set_pause(true)if just_reset:just_reset = falsevar obs = _get_obs_from_agents()var reply = {"type": "reset","obs": obs}_send_dict_as_json_message(reply)# this should go straight to getting the action and setting it checked the agent, no need to perform one phyics tickget_tree().set_pause(false)returnif need_to_send_obs:need_to_send_obs = falsevar reward = _get_reward_from_agents()var done = _get_done_from_agents()#_reset_agents_if_done() # this ensures the new observation is from the next env instance : NEEDS REFACTORvar obs = _get_obs_from_agents()var reply = {"type": "step","obs": obs,"reward": reward,"done": done}_send_dict_as_json_message(reply)var handled = handle_message()else:_reset_agents_if_done()func handle_message() -> bool:# get json message: reset, step, close63 unmodified linesvar obs = []for agent in agents:obs.append(agent.get_obs())return obsfunc _get_reward_from_agents():15 unmodified linesfor i in range(len(actions)):agents[i].set_action(actions[i])1 unmodified line23456789107 unmodified lines1819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813938 unmodified lines1781791801811821831841851861871881891901911921936 unmodified lines20020120220320420520620720820921021121224 unmodified lines23723823924024124224363 unmodified lines30730830931031131231315 unmodified lines3293303313323333343353361 unmodified line# --fixed-fps 2000 --disable-render-loop@export var action_repeat := 8@export var speed_up = 1@export var onnx_model_path := ""@onready var start_time = Time.get_ticks_msec()const MAJOR_VERSION := "0"const MINOR_VERSION := "3"7 unmodified linesvar agentsvar need_to_send_obs = falsevar args = nullvar initialized = falsevar just_reset = falsevar onnx_model = nullvar n_action_steps = 0var _action_space : Dictionaryvar _obs_space : Dictionary# Called when the node enters the scene tree for the first time.func _ready():await get_tree().root.readyget_tree().set_pause(true)_initialize()await get_tree().create_timer(1.0).timeoutget_tree().set_pause(false)func _initialize():_get_agents()_obs_space = agents[0].get_obs_space()_action_space = agents[0].get_action_space()args = _get_args()Engine.physics_ticks_per_second = _get_speedup() * 60 # Replace with function body.Engine.time_scale = _get_speedup() * 1.0prints("physics ticks", Engine.physics_ticks_per_second, Engine.time_scale, _get_speedup(), speed_up)connected = connect_to_server()if connected:_set_heuristic("model")_handshake()_send_env_info()elif onnx_model_path != "":onnx_model = ONNXModel.new(onnx_model_path, 1)_set_heuristic("model")else:_set_heuristic("human")_set_seed()_set_action_repeat()initialized = truefunc _physics_process(delta):# two modes, human control, agent control# pause tree, send obs, get actions, set actions, unpause treeif n_action_steps % action_repeat != 0:n_action_steps += 1returnn_action_steps += 1if connected:get_tree().set_pause(true)if just_reset:just_reset = falsevar obs = _get_obs_from_agents()var reply = {"type": "reset","obs": obs}_send_dict_as_json_message(reply)# this should go straight to getting the action and setting it checked the agent, no need to perform one phyics tickget_tree().set_pause(false)returnif need_to_send_obs:need_to_send_obs = falsevar reward = _get_reward_from_agents()var done = _get_done_from_agents()#_reset_agents_if_done() # this ensures the new observation is from the next env instance : NEEDS REFACTORvar obs = _get_obs_from_agents()var reply = {"type": "step","obs": obs,"reward": reward,"done": done}_send_dict_as_json_message(reply)var handled = handle_message()elif onnx_model != null:var obs : Array = _get_obs_from_agents()var actions = []for o in obs:var action = onnx_model.run_inference(o["obs"], 1.0)action["output"] = clamp_array(action["output"], -1.0, 1.0)var action_dict = _extract_action_dict(action["output"])actions.append(action_dict)_set_agent_actions(actions)need_to_send_obs = trueget_tree().set_pause(false)_reset_agents_if_done()else:_reset_agents_if_done()func _extract_action_dict(action_array: Array):var index = 0var result = {}for key in _action_space.keys():var size = _action_space[key]["size"]if _action_space[key]["action_type"] == "discrete":result[key] = round(action_array[index])else:result[key] = action_array.slice(index,index+size)index += sizereturn resultfunc _get_agents():agents = get_tree().get_nodes_in_group("AGENT")38 unmodified linesfunc _send_env_info():var json_dict = _get_dict_json_message()assert(json_dict["type"] == "env_info")var message = {"type" : "env_info","observation_space": _obs_space,"action_space":_action_space,"n_agents": len(agents)}_send_dict_as_json_message(message)func connect_to_server():print("Waiting for one second to allow server to start")OS.delay_msec(1000)6 unmodified linesvar connect = stream.connect_to_host(ip, port)stream.set_no_delay(true) # TODO check if this improves performance or notstream.poll()# Fetch the status until it is either connected (2) or failed to connect (3)while stream.get_status() < 2:stream.poll()return stream.get_status() == 2func _get_args():print("getting command line arguments")var arguments = {}for argument in OS.get_cmdline_args():print(argument)24 unmodified linesfunc disconnect_from_server():stream.disconnect_from_host()func handle_message() -> bool:# get json message: reset, step, close63 unmodified linesvar obs = []for agent in agents:obs.append(agent.get_obs())return obsfunc _get_reward_from_agents():15 unmodified linesfor i in range(len(actions)):agents[i].set_action(actions[i])func clamp_array(arr : Array, min:float, max:float):var output : Array = []for a in arr:output.append(clamp(a, min, max))return output
3 unmodified lines45678910111213141516171819202122232425263 unmodified linestype="CompressedTexture2D"uid="uid://c780rrvs38fx4"path.s3tc="res://.godot/imported/texture_01.png-9288b996c66c7a4aa795297ca1c38041.s3tc.ctex"path.etc2="res://.godot/imported/texture_01.png-9288b996c66c7a4aa795297ca1c38041.etc2.ctex"metadata={"imported_formats": ["s3tc", "etc2"],"vram_texture": true}[deps]source_file="res://assets/prototype_textures/PNG/Dark/texture_01.png"dest_files=["res://.godot/imported/texture_01.png-9288b996c66c7a4aa795297ca1c38041.s3tc.ctex", "res://.godot/imported/texture_01.png-9288b996c66c7a4aa795297ca1c38041.etc2.ctex"][params]compress/mode=2compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=true3 unmodified lines456789101112131415161718192021222324253 unmodified linestype="CompressedTexture2D"uid="uid://c780rrvs38fx4"path.s3tc="res://.godot/imported/texture_01.png-9288b996c66c7a4aa795297ca1c38041.s3tc.ctex"metadata={"imported_formats": ["s3tc_bptc"],"vram_texture": true}[deps]source_file="res://assets/prototype_textures/PNG/Dark/texture_01.png"dest_files=["res://.godot/imported/texture_01.png-9288b996c66c7a4aa795297ca1c38041.s3tc.ctex"][params]compress/mode=2compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=true
3 unmodified lines45678910111213141516171819202122232425263 unmodified linestype="CompressedTexture2D"uid="uid://cfbeqr5564bfi"path.s3tc="res://.godot/imported/texture_02.png-961fb5d1929755d100a63670dcfaa728.s3tc.ctex"path.etc2="res://.godot/imported/texture_02.png-961fb5d1929755d100a63670dcfaa728.etc2.ctex"metadata={"imported_formats": ["s3tc", "etc2"],"vram_texture": true}[deps]source_file="res://assets/prototype_textures/PNG/Dark/texture_02.png"dest_files=["res://.godot/imported/texture_02.png-961fb5d1929755d100a63670dcfaa728.s3tc.ctex", "res://.godot/imported/texture_02.png-961fb5d1929755d100a63670dcfaa728.etc2.ctex"][params]compress/mode=2compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=true3 unmodified lines456789101112131415161718192021222324253 unmodified linestype="CompressedTexture2D"uid="uid://cfbeqr5564bfi"path.s3tc="res://.godot/imported/texture_02.png-961fb5d1929755d100a63670dcfaa728.s3tc.ctex"metadata={"imported_formats": ["s3tc_bptc"],"vram_texture": true}[deps]source_file="res://assets/prototype_textures/PNG/Dark/texture_02.png"dest_files=["res://.godot/imported/texture_02.png-961fb5d1929755d100a63670dcfaa728.s3tc.ctex"][params]compress/mode=2compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=true
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
3 unmodified lines45678910111213141516171819202122232425263 unmodified linestype="CompressedTexture2D"uid="uid://di5jhcrlhabm5"path.s3tc="res://.godot/imported/texture_13.png-ec42b6c8f97231221149893e21ac3c8a.s3tc.ctex"path.etc2="res://.godot/imported/texture_13.png-ec42b6c8f97231221149893e21ac3c8a.etc2.ctex"metadata={"imported_formats": ["s3tc", "etc2"],"vram_texture": true}[deps]source_file="res://assets/prototype_textures/PNG/Dark/texture_13.png"dest_files=["res://.godot/imported/texture_13.png-ec42b6c8f97231221149893e21ac3c8a.s3tc.ctex", "res://.godot/imported/texture_13.png-ec42b6c8f97231221149893e21ac3c8a.etc2.ctex"][params]compress/mode=2compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=true3 unmodified lines456789101112131415161718192021222324253 unmodified linestype="CompressedTexture2D"uid="uid://di5jhcrlhabm5"path.s3tc="res://.godot/imported/texture_13.png-ec42b6c8f97231221149893e21ac3c8a.s3tc.ctex"metadata={"imported_formats": ["s3tc_bptc"],"vram_texture": true}[deps]source_file="res://assets/prototype_textures/PNG/Dark/texture_13.png"dest_files=["res://.godot/imported/texture_13.png-ec42b6c8f97231221149893e21ac3c8a.s3tc.ctex"][params]compress/mode=2compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=true
3 unmodified lines45678910111213141516171819202122232425263 unmodified linestype="CompressedTexture2D"uid="uid://c2n22yubjk0do"path.s3tc="res://.godot/imported/texture_01.png-580d3f0b89ba3a32c34aa87a192138b5.s3tc.ctex"path.etc2="res://.godot/imported/texture_01.png-580d3f0b89ba3a32c34aa87a192138b5.etc2.ctex"metadata={"imported_formats": ["s3tc", "etc2"],"vram_texture": true}[deps]source_file="res://assets/prototype_textures/PNG/Green/texture_01.png"dest_files=["res://.godot/imported/texture_01.png-580d3f0b89ba3a32c34aa87a192138b5.s3tc.ctex", "res://.godot/imported/texture_01.png-580d3f0b89ba3a32c34aa87a192138b5.etc2.ctex"][params]compress/mode=2compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=true3 unmodified lines456789101112131415161718192021222324253 unmodified linestype="CompressedTexture2D"uid="uid://c2n22yubjk0do"path.s3tc="res://.godot/imported/texture_01.png-580d3f0b89ba3a32c34aa87a192138b5.s3tc.ctex"metadata={"imported_formats": ["s3tc_bptc"],"vram_texture": true}[deps]source_file="res://assets/prototype_textures/PNG/Green/texture_01.png"dest_files=["res://.godot/imported/texture_01.png-580d3f0b89ba3a32c34aa87a192138b5.s3tc.ctex"][params]compress/mode=2compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=true
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/lossy_quality=0.7compress/hdr_compression=1compress/bptc_ldr=0compress/normal_map=0compress/channel_pack=0mipmaps/generate=false15 unmodified lines16171819202122232415 unmodified lines[params]compress/mode=0compress/high_quality=falsecompress/lossy_quality=0.7compress/hdr_compression=1compress/normal_map=0compress/channel_pack=0mipmaps/generate=false
addons/godot_rl_agents/controller/ai_controller.gdAdded+77
addons/godot_rl_agents/controller/ai_controller_2d.gdAdded+8
addons/godot_rl_agents/controller/ai_controller_3d.gdAdded+8
addons/godot_rl_agents/icon.png.import+2-2
addons/godot_rl_agents/onnx/csharp/ONNXInference.csAdded+93
addons/godot_rl_agents/onnx/csharp/SessionConfigurator.csAdded+106
addons/godot_rl_agents/onnx/csharp/docs/ONNXInference.xmlAdded+31
addons/godot_rl_agents/onnx/csharp/docs/SessionConfigurator.xmlAdded+29
addons/godot_rl_agents/onnx/wrapper/ONNX_wrapper.gdAdded+19
addons/godot_rl_agents/sensors/sensors_2d/ExampleRaycastSensor2D.tscn+11-11
addons/godot_rl_agents/sensors/sensors_2d/ISensor2D.gd+1-1
addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.gd+31-7
addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.tscn+4-3
addons/godot_rl_agents/sensors/sensors_3d/ISensor3D.gd+1-1
addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.gd+8-8
addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.tscn+26-42
addons/godot_rl_agents/sync.gd+119-78
assets/prototype_textures/PNG/Dark/texture_01.png.import+3-4
assets/prototype_textures/PNG/Dark/texture_02.png.import+3-4
assets/prototype_textures/PNG/Dark/texture_03.png.import+1-1
assets/prototype_textures/PNG/Dark/texture_04.png.import+1-1
assets/prototype_textures/PNG/Dark/texture_05.png.import+1-1
assets/prototype_textures/PNG/Dark/texture_06.png.import+1-1
assets/prototype_textures/PNG/Dark/texture_07.png.import+1-1
assets/prototype_textures/PNG/Dark/texture_08.png.import+1-1
assets/prototype_textures/PNG/Dark/texture_09.png.import+1-1
assets/prototype_textures/PNG/Dark/texture_10.png.import+1-1
assets/prototype_textures/PNG/Dark/texture_11.png.import+1-1
assets/prototype_textures/PNG/Dark/texture_12.png.import+1-1
assets/prototype_textures/PNG/Dark/texture_13.png.import+3-4
assets/prototype_textures/PNG/Green/texture_01.png.import+3-4
assets/prototype_textures/PNG/Green/texture_02.png.import+1-1
assets/prototype_textures/PNG/Green/texture_03.png.import+1-1
assets/prototype_textures/PNG/Green/texture_04.png.import+1-1
assets/prototype_textures/PNG/Green/texture_05.png.import+1-1
assets/prototype_textures/PNG/Green/texture_06.png.import+1-1
assets/prototype_textures/PNG/Green/texture_07.png.import+1-1
assets/prototype_textures/PNG/Green/texture_08.png.import+1-1
assets/prototype_textures/PNG/Green/texture_09.png.import+1-1
assets/prototype_textures/PNG/Green/texture_10.png.import+1-1
assets/prototype_textures/PNG/Green/texture_11.png.import+1-1
assets/prototype_textures/PNG/Green/texture_12.png.import+1-1
assets/prototype_textures/PNG/Green/texture_13.png.import+1-1
assets/prototype_textures/PNG/Light/texture_01.png.import+1-1
assets/prototype_textures/PNG/Light/texture_02.png.import+1-1
assets/prototype_textures/PNG/Light/texture_03.png.import+1-1
assets/prototype_textures/PNG/Light/texture_04.png.import+1-1
assets/prototype_textures/PNG/Light/texture_05.png.import+1-1
assets/prototype_textures/PNG/Light/texture_06.png.import+1-1
assets/prototype_textures/PNG/Light/texture_07.png.import+1-1