repo_name stringlengths 1 52 | repo_creator stringclasses 6
values | programming_language stringclasses 4
values | code stringlengths 0 9.68M | num_lines int64 1 234k |
|---|---|---|---|---|
ml-agents | openai | C# | using UnityEngine;
namespace MLAgents
{
/// <summary>
/// This class contains logic for locomotion agents with joints which might make contact with the ground.
/// By attaching this as a component to those joints, their contact with the ground can be used as either
/// an observation for that agent, an... | 53 |
ml-agents | openai | C# | using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Serialization;
namespace MLAgents
{
/// <summary>
/// Used to store relevant information for acting and learning for each body part in agent.
/// </summary>
[System.Serializable]
public class BodyPart
{
[Header("Body... | 180 |
ml-agents | openai | C# | using System.Collections.Generic;
using UnityEngine;
namespace MLAgents
{
public class RandomDecision : Decision
{
public override float[] Decide(
List<float> vectorObs,
List<Texture2D> visualObs,
float reward,
bool done,
List<float> memory)
... | 48 |
ml-agents | openai | C# | using System.Collections.Generic;
using UnityEngine;
public abstract class RayPerception : MonoBehaviour
{
protected List<float> m_PerceptionBuffer = new List<float>();
public virtual List<float> Perceive(float rayDistance,
float[] rayAngles, string[] detectableObjects,
float startOffset, floa... | 23 |
ml-agents | openai | C# | using System.Collections.Generic;
using UnityEngine;
namespace MLAgents
{
/// <summary>
/// Ray 2D perception component. Attach this to agents to enable "local perception"
/// via the use of ray casts directed outward from the agent.
/// </summary>
public class RayPerception2D : RayPerception
{... | 83 |
ml-agents | openai | C# | using System;
using System.Collections.Generic;
using UnityEngine;
namespace MLAgents
{
/// <summary>
/// Ray perception component. Attach this to agents to enable "local perception"
/// via the use of ray casts directed outward from the agent.
/// </summary>
public class RayPerception3D : RayPerce... | 96 |
ml-agents | openai | C# | using UnityEngine;
namespace MLAgents
{
/// <summary>
/// This class contains logic for locomotion agents with joints which might make contact with a target.
/// By attaching this as a component to those joints, their contact with the ground can be used as
/// an observation for that agent.
/// </s... | 39 |
ml-agents | openai | C# | using UnityEngine;
using MLAgents;
public class AgentSoccer : Agent
{
public enum Team
{
Purple,
Blue
}
public enum AgentRole
{
Striker,
Goalie
}
public Team team;
public AgentRole agentRole;
float m_KickPower;
int m_PlayerIndex;
public Socce... | 216 |
ml-agents | openai | C# | using UnityEngine;
using MLAgents;
public class SoccerAcademy : Academy
{
public Material purpleMaterial;
public Material blueMaterial;
public float gravityMultiplier = 1;
public bool randomizePlayersTeamForTraining = true;
public float agentRunSpeed;
public float strikerPunish; //if opponent... | 32 |
ml-agents | openai | C# | using UnityEngine;
public class SoccerBallController : MonoBehaviour
{
[HideInInspector]
public SoccerFieldArea area;
public AgentSoccer lastTouchedBy; //who was the last to touch the ball
public string agentTag; //will be used to check if collided with a agent
public string purpleGoalTag; //will b... | 24 |
ml-agents | openai | C# | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Serialization;
[System.Serializable]
public class PlayerState
{
public int playerIndex;
[FormerlySerializedAs("agentRB")]
public Rigidbody agentRb;
public Vector3 startingPos;
public AgentSoccer agentSc... | 164 |
ml-agents | openai | C# | using UnityEngine;
using MLAgents;
public class TemplateAcademy : Academy
{
public override void AcademyReset()
{
}
public override void AcademyStep()
{
}
}
| 14 |
ml-agents | openai | C# | using UnityEngine;
using MLAgents;
public class TemplateAgent : Agent
{
public override void CollectObservations()
{
}
public override void AgentAction(float[] vectorAction, string textAction)
{
}
public override void AgentReset()
{
}
public override void AgentOnDone()
{
... | 22 |
ml-agents | openai | C# | using System.Collections.Generic;
using UnityEngine;
using MLAgents;
public class TemplateDecision : Decision
{
public override float[] Decide(
List<float> vectorObs,
List<Texture2D> visualObs,
float reward,
bool done,
List<float> memory)
{
return new float[0];
... | 27 |
ml-agents | openai | C# | using UnityEngine;
public class HitWall : MonoBehaviour
{
public GameObject areaObject;
public int lastAgentHit;
private TennisArea m_Area;
private TennisAgent m_AgentA;
private TennisAgent m_AgentB;
// Use this for initialization
void Start()
{
m_Area = areaObject.GetComponen... | 126 |
ml-agents | openai | C# | using UnityEngine;
using MLAgents;
public class TennisAcademy : Academy
{
public override void AcademyReset()
{
Physics.gravity = new Vector3(0, -resetParameters["gravity"], 0);
}
public override void AcademyStep()
{
}
}
| 15 |
ml-agents | openai | C# | using UnityEngine;
using UnityEngine.UI;
using MLAgents;
public class TennisAgent : Agent
{
[Header("Specific to Tennis")]
public GameObject ball;
public bool invertX;
public int score;
public GameObject myArea;
public float angle;
public float scale;
private Text m_TextComponent;
... | 115 |
ml-agents | openai | C# | using UnityEngine;
public class TennisArea : MonoBehaviour
{
public GameObject ball;
public GameObject agentA;
public GameObject agentB;
private Rigidbody m_BallRb;
// Use this for initialization
void Start()
{
m_BallRb = ball.GetComponent<Rigidbody>();
MatchReset();
}
... | 40 |
ml-agents | openai | C# | using UnityEngine;
using MLAgents;
public class WalkerAcademy : Academy
{
public override void InitializeAcademy()
{
Monitor.verticalOffset = 1f;
// We increase the Physics solver iterations in order to
// make walker joint calculations more accurate.
Physics.defaultSolverItera... | 27 |
ml-agents | openai | C# | using UnityEngine;
using MLAgents;
public class WalkerAgent : Agent
{
[Header("Specific to Walker")][Header("Target To Walk Towards")][Space(10)]
public Transform target;
Vector3 m_DirToTarget;
public Transform hips;
public Transform chest;
public Transform spine;
public Transform head;
... | 215 |
ml-agents | openai | C# | using UnityEngine;
using MLAgents;
public class WallJumpAcademy : Academy
{
[Header("Specific to WallJump")]
public float agentRunSpeed;
public float agentJumpHeight;
//when a goal is scored the ground will use this material for a few seconds.
public Material goalScoredMaterial;
//when fail, th... | 28 |
ml-agents | openai | C# | //Put this script on your blue cube.
using System.Collections;
using UnityEngine;
using MLAgents;
public class WallJumpAgent : Agent
{
// Depending on this value, the wall will have different height
int m_Configuration;
// Brain to use when no wall is present
public Brain noWallBrain;
// Brain to ... | 330 |
ml-agents | openai | C# | using System.IO;
using UnityEditor;
using UnityEngine;
using UnityEditor.Experimental.AssetImporters;
namespace Barracuda
{
/// <summary>
/// Asset Importer of barracuda models.
/// </summary>
[ScriptedImporter(1, new[] {"nn"})]
public class NNModelImporter : ScriptedImporter
{
private ... | 43 |
ml-agents | openai | C# | #if UNITY_IOS
using System.Runtime.InteropServices;
using Barracuda;
using UnityEngine;
using UnityEngine.Scripting;
[Preserve]
public class iOSBLAS : BLASPlugin
{
[DllImport("__Internal")]
static extern unsafe void iossgemm(float* Ap, int AN, int AM,
float* Bp, int BN, int BM,
float* Cp, int C... | 28 |
ml-agents | openai | C# | #if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX
using System.Runtime.InteropServices;
using Barracuda;
using UnityEngine;
using UnityEngine.Scripting;
[Preserve]
public class MacBLAS : BLASPlugin
{
[DllImport("macblas")]
static extern unsafe void macsgemm(float* ap, int an, int am,
float* bp, int bn, int... | 30 |
ml-agents | openai | C# | using UnityEngine;
using System.IO;
using System.Linq;
using UnityEngine.Serialization;
#if UNITY_EDITOR
using UnityEditor;
#endif
/**
* Welcome to Unity Machine Learning Agents (ML-Agents).
*
* The ML-Agents toolkit contains five entities: Academy, Brain, Agent, Communicator and
* Python API. The academy, and al... | 600 |
ml-agents | openai | C# | using System;
using System.Collections.Generic;
using System.Linq;
namespace MLAgents
{
public class ActionMasker
{
/// When using discrete control, is the starting indices of the actions
/// when all the branches are concatenated with each other.
private int[] m_StartingActionIndices;
... | 138 |
ml-agents | openai | C# | using System.Collections.Generic;
using Google.Protobuf;
using MLAgents.CommunicatorObjects;
using UnityEngine;
namespace MLAgents
{
/// <summary>
/// Struct that contains all the information for an Agent, including its
/// observations, actions and current status, that is sent to the Brain.
/// </sum... | 1,182 |
ml-agents | openai | C# | using System.Collections.Generic;
using System.Linq;
using System;
using UnityEngine;
namespace MLAgents
{
/// <summary>
/// The batcher is an RL specific class that makes sure that the information each object in
/// Unity (Academy and Brains) wants to send to External is appropriately batched together
... | 290 |
ml-agents | openai | C# | using UnityEngine;
namespace MLAgents
{
/// <summary>
/// Behavioral Cloning Helper script. Attach to teacher agent to enable
/// resetting the experience buffer, as well as toggling session recording.
/// </summary>
public class BcTeacherHelper : MonoBehaviour
{
bool m_RecordExperience... | 60 |
ml-agents | openai | C# | using System.Collections.Generic;
using UnityEngine;
namespace MLAgents
{
/// <summary>
/// Brain receive data from Agents through calls to SendState. The brain then updates the
/// actions of the agents at each FixedUpdate.
/// The Brain encapsulates the decision making process. Every Agent must be as... | 112 |
ml-agents | openai | C# | using System;
using UnityEngine;
using System.Linq;
namespace MLAgents
{
public enum SpaceType
{
Discrete,
Continuous
};
/// <summary>
/// The resolution of a camera used by an agent.
/// The width defines the number of pixels on the horizontal axis.
/// The height defines ... | 155 |
ml-agents | openai | C# | using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Serialization;
namespace MLAgents
{
/// <summary>
/// BroadcastHub holds reference to brains and keeps track wether or not the brain be
/// remotely controlled.
/// </summary>
[System.Serializable]
public class BroadcastHub
... | 71 |
ml-agents | openai | C# | using System.Collections.Generic;
using UnityEngine;
namespace MLAgents
{
/// <summary>
/// Interface for implementing the behavior of an Agent that uses a Heuristic
/// Brain. The behavior of an Agent in this case is fully decided using the
/// implementation of these methods and no training or infere... | 56 |
ml-agents | openai | C# | using System;
using MLAgents.CommunicatorObjects;
using UnityEngine;
namespace MLAgents
{
/// <summary>
/// Demonstration Object. Contains meta-data regarding demonstration.
/// Used for imitation learning, or other forms of learning from data.
/// </summary>
[Serializable]
public class Demonst... | 77 |
ml-agents | openai | C# | using UnityEngine;
using System.Text.RegularExpressions;
namespace MLAgents
{
/// <summary>
/// Demonstration Recorder Component.
/// </summary>
[RequireComponent(typeof(Agent))]
public class DemonstrationRecorder : MonoBehaviour
{
public bool record;
public string demonstration... | 86 |
ml-agents | openai | C# | using System.IO;
using System.IO.Abstractions;
using Google.Protobuf;
namespace MLAgents
{
/// <summary>
/// Responsible for writing demonstration data to file.
/// </summary>
public class DemonstrationStore
{
public const int MetaDataBytes = 32; // Number of bytes allocated to metadata in ... | 138 |
ml-agents | openai | C# | using UnityEngine;
using UnityEngine.Serialization;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace MLAgents
{
/// <summary>
/// The Heuristic Brain type allows you to hand code an Agent's decision making process.
/// A Heuristic Brain requires an implementation of the Decision interface to which it
... | 84 |
ml-agents | openai | C# | using UnityEngine;
using MLAgents.CommunicatorObjects;
namespace MLAgents
{
public struct CommunicatorParameters
{
public int port;
}
/**
This is the interface of the Communicators.
This does not need to be modified nor implemented to create a Unity environment.
When the Unity Com... | 72 |
ml-agents | openai | C# | using System;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
using Barracuda;
using MLAgents.InferenceBrain;
using UnityEngine.Profiling;
namespace MLAgents
{
public enum InferenceDevice
{
CPU = 0,
GPU = 1
}
/// <summary>
/// The Learning Brain works differ... | 204 |
ml-agents | openai | C# | using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace MLAgents
{
/// <summary>
/// Monitor is used to display information about the Agent within the Unity
/// scene. Use the log function to add information to your monitor.
/// </summary>
public class Monitor : MonoBehavi... | 561 |
ml-agents | openai | C# | using UnityEngine;
using UnityEngine.Serialization;
namespace MLAgents
{
/// <summary>
/// Implemetation of the Player Brain. Inherits from the base class Brain. Allows the user to
/// manually select decisions for linked agents by creating a mapping from keys presses to
/// actions.
/// You can us... | 106 |
ml-agents | openai | C# | using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Serialization;
namespace MLAgents
{
[Serializable]
public class ResetParameters : Dictionary<string, float>, ISerializationCallbackReceiver
{
[Serializable]
public struct ResetParameter
{
... | 54 |
ml-agents | openai | C# | # if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_STANDALONE_LINUX
using Grpc.Core;
#endif
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;
using MLAgents.CommunicatorObjects;
namespace MLAgents
{
/// Responsible for communication with External using gRPC.
public class Rpc... | 184 |
ml-agents | openai | C# | using Google.Protobuf;
using System.Net.Sockets;
using UnityEngine;
using MLAgents.CommunicatorObjects;
using System.Threading.Tasks;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace MLAgents
{
public class SocketCommunicator : ICommunicator
{
private const float k_TimeOut = 10f;
private co... | 182 |
ml-agents | openai | C# | using System;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace MLAgents
{
public class Startup : MonoBehaviour
{
private const string k_SceneVariableName = "SCENE_NAME";
private void Awake()
{
var sceneName = Environment.GetEnvironmentVariable(k_SceneVariable... | 33 |
ml-agents | openai | C# | using System;
namespace MLAgents
{
/// Contains exceptions specific to ML-Agents.
[Serializable]
public class UnityAgentsException : Exception
{
/// When a UnityAgentsException is called, the timeScale is set to 0.
/// The simulation will end since no steps will be taken.
public... | 24 |
ml-agents | openai | C# | using UnityEngine;
using System.Collections.Generic;
using MLAgents.InferenceBrain;
namespace MLAgents
{
public static class Utilities
{
/// <summary>
/// Converts a list of Texture2D into a TensorProxy.
/// </summary>
/// <param name="textures">
/// The list of textures... | 141 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/agent_action_proto.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Pro... | 283 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/agent_info_proto.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Proto... | 461 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/brain_parameters_proto.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google... | 358 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/command_proto.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf... | 50 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/custom_action.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf... | 146 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/custom_observation.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Pro... | 147 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/custom_reset_parameters.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Googl... | 147 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/demonstration_meta_proto.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Goog... | 290 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/engine_configuration_proto.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Go... | 318 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/environment_parameters_proto.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::... | 208 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/header.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collec... | 203 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/resolution_proto.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Proto... | 232 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/space_type_proto.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Proto... | 51 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/unity_input.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.C... | 220 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/unity_message.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf... | 256 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/unity_output.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.... | 221 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/unity_rl_initialization_input.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global:... | 175 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/unity_rl_initialization_output.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global... | 296 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/unity_rl_input.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobu... | 399 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/unity_rl_output.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protob... | 331 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/unity_to_external.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Prot... | 44 |
ml-agents | openai | C# | // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mlagents/envs/communicator_objects/unity_to_external.proto
// </auto-generated>
# if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_STANDALONE_LINUX
#pragma warning disable 0414, 1591
#region Desi... | 137 |
ml-agents | openai | C# | using System;
using System.Collections.Generic;
using System.Linq;
using Barracuda;
using MLAgents.InferenceBrain.Utils;
using UnityEngine;
namespace MLAgents.InferenceBrain
{
/// <summary>
/// The Applier for the Continuous Action output tensor. Tensor is assumed to contain the
/// continuous action data ... | 250 |
ml-agents | openai | C# | using System;
using System.Collections.Generic;
using System.Linq;
using Barracuda;
namespace MLAgents.InferenceBrain
{
/// <summary>
/// Prepares the Tensors for the Learning Brain and exposes a list of failed checks if Model
/// and BrainParameters are incompatible.
/// </summary>
public class Ba... | 549 |
ml-agents | openai | C# | using System.Collections.Generic;
using System;
using System.Linq;
using Barracuda;
using MLAgents.InferenceBrain.Utils;
namespace MLAgents.InferenceBrain
{
/// <summary>
/// Reshapes a Tensor so that its first dimension becomes equal to the current batch size
/// and initializes its content to be zeros. W... | 318 |
ml-agents | openai | C# | using System.Collections.Generic;
using Barracuda;
namespace MLAgents.InferenceBrain
{
/// <summary>
/// Mapping between the output tensor names and the method that will use the
/// output tensors and the Agents present in the batch to update their action, memories and
/// value estimates.
/// A Te... | 97 |
ml-agents | openai | C# | using System.Collections.Generic;
using Barracuda;
namespace MLAgents.InferenceBrain
{
/// <summary>
/// Mapping between Tensor names and generators.
/// A TensorGenerator implements a Dictionary of strings (node names) to an Action.
/// The Action take as argument the tensor, the current batch size an... | 120 |
ml-agents | openai | C# | namespace MLAgents.InferenceBrain
{
/// <summary>
/// Contains the names of the input and output tensors for the Inference Brain.
/// </summary>
public static class TensorNames
{
public const string BatchSizePlaceholder = "batch_size";
public const string SequenceLengthPlaceholder = ... | 30 |
ml-agents | openai | C# | using System;
using System.Collections.Generic;
using Barracuda;
using MLAgents.InferenceBrain.Utils;
namespace MLAgents.InferenceBrain
{
/// <summary>
/// Tensor - A class to encapsulate a Tensor used for inference.
///
/// This class contains the Array that holds the data array, the shapes, type and ... | 124 |
ml-agents | openai | C# | namespace MLAgents.InferenceBrain.Utils
{
/// <summary>
/// Multinomial - Draws samples from a multinomial distribution given a (potentially unscaled)
/// cumulative mass function (CMF). This means that the CMF need not "end" with probability
/// mass of 1.0. For instance: [0.1, 0.2, 0.5] is a valid (un... | 49 |
ml-agents | openai | C# | using System;
namespace MLAgents.InferenceBrain.Utils
{
/// <summary>
/// RandomNormal - A random number generator that produces normally distributed random
/// numbers using the Marsaglia polar method:
/// https://en.wikipedia.org/wiki/Marsaglia_polar_method
/// TODO: worth overriding System.Rando... | 57 |
orrb | openai | C# | using System;
using System.Linq.Expressions;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
public class BaseEditor<T> : Editor
where T : MonoBehaviour
{
protected T m_Target
{
get { return (T)target; }
... | 22 |
orrb | openai | C# | using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Assertions;
using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
public sealed class EffectListEditor
{
Editor m_BaseEditor;
PostProcessProfile m_Asse... | 317 |
orrb | openai | C# | using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
[CustomEditor(typeof(PostProcessDebug))]
public sealed class PostProcessDebugEditor : BaseEditor<PostProcessDebug>
{
SerializedProperty m_PostProcessLayer;
SerializedProperty m_Li... | 136 |
orrb | openai | C# | using System;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
public class PostProcessEffectBaseEditor
{
internal PostProcessEffectSettings target { get; private set; }
internal SerializedObject serializedObject { get; private set;... | 184 |
orrb | openai | C# | using System;
using System.Linq.Expressions;
using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
public class PostProcessEffectEditor<T> : PostProcessEffectBaseEditor
where T : PostProcessEffectSettings
{
protected SerializedProperty FindProperty<TValue>... | 23 |
orrb | openai | C# | using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
using UnityEditorInternal;
using System.IO;
namespace UnityEditor.Rendering.PostProcessing
{
using SerializedBundleRef = PostProcessLayer.SerializedBundleRef;
using EXRFlags = Textu... | 403 |
orrb | openai | C# | using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
[CustomEditor(typeof(PostProcessProfile))]
sealed class PostProcessProfileEditor : Editor
{
EffectListEditor m_EffectList;
void OnEnable()
{
m_EffectList = new EffectListEditor(... | 30 |
orrb | openai | C# | using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
[CanEditMultipleObjects, CustomEditor(typeof(PostProcessVolume))]
public sealed class PostProcessVolumeEditor : BaseEditor<PostProcessVolume>
{
SerializedProperty m_Profile;
Seri... | 151 |
orrb | openai | C# | using System;
namespace UnityEditor.Rendering.PostProcessing
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class DecoratorAttribute : Attribute
{
public readonly Type attributeType;
public DecoratorAttribute(Type attributeType)
{
this.a... | 16 |
orrb | openai | C# | using System;
namespace UnityEngine.Rendering.PostProcessing
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class PostProcessEditorAttribute : Attribute
{
public readonly Type settingsType;
public PostProcessEditorAttribute(Type settingsType)
{
... | 16 |
orrb | openai | C# | using System;
using UnityEngine;
namespace UnityEditor.Rendering.PostProcessing
{
public abstract class AttributeDecorator
{
// Override this and return false if you want to customize the override checkbox position,
// else it'll automatically draw it and put the property content in a horizonta... | 18 |
orrb | openai | C# | using System;
using UnityEngine;
namespace UnityEditor.Rendering.PostProcessing
{
[Decorator(typeof(RangeAttribute))]
public sealed class RangeDecorator : AttributeDecorator
{
public override bool OnGUI(SerializedProperty property, SerializedProperty overrideState, GUIContent title, Attribute attri... | 144 |
orrb | openai | C# | using System;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
[Decorator(typeof(TrackballAttribute))]
public sealed class TrackballDecorator : AttributeDecorator
{
static readonly int k_ThumbHash = "colorWheelThumb".GetHashCode();
... | 210 |
orrb | openai | C# | using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
[PostProcessEditor(typeof(AmbientOcclusion))]
public sealed class AmbientOcclusionEditor : PostProcessEffectEditor<AmbientOcclusion>
{
SerializedParameterOverride m_Mode;
Serializ... | 74 |
orrb | openai | C# | using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
[PostProcessEditor(typeof(AutoExposure))]
public sealed class AutoExposureEditor : PostProcessEffectEditor<AutoExposure>
{
SerializedParameterOverride m_Filtering;
Serial... | 64 |
orrb | openai | C# | using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
[PostProcessEditor(typeof(Bloom))]
public sealed class BloomEditor : PostProcessEffectEditor<Bloom>
{
SerializedParameterOverride m_Intensity;
SerializedParameterOverride m_Threshold;
Serial... | 60 |
orrb | openai | C# | using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
[PostProcessEditor(typeof(ColorGrading))]
public sealed class ColorGradingEditor : PostProcessEffectEditor<ColorGrading>
{
SerializedParameterOverride m_... | 739 |
orrb | openai | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
public class DefaultPostProcessEffectEditor : PostProcessEffectBaseEditor
{
List<SerializedParameterOverride> m_Parame... | 42 |
orrb | openai | C# | using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
[PostProcessEditor(typeof(DepthOfField))]
public sealed class DepthOfFieldEditor : PostProcessEffectEditor<DepthOfField>
{
SerializedParameterOverride m_FocusDistance;
SerializedP... | 34 |
orrb | openai | C# | using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
[PostProcessEditor(typeof(ScreenSpaceReflections))]
public sealed class ScreenSpaceReflectionsEditor : PostProcessEffectEditor<ScreenSpaceReflections>
{
SerializedParameterOverride m_Pres... | 59 |
orrb | openai | C# | using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
[PostProcessEditor(typeof(Vignette))]
public sealed class VignetteEditor : PostProcessEffectEditor<Vignette>
{
SerializedParameterOverride m_Mode;
SerializedParameterOverride m_Co... | 92 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.