text stringlengths 7 35.3M | id stringlengths 11 185 | metadata dict | __index_level_0__ int64 0 2.14k |
|---|---|---|---|
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &253232877
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 253232878}
- component: {fileID: 253232880}
- componen... | ml-agents/Project/Assets/ML-Agents/Examples/Soccer/Prefabs/StrikersVsGoalieField.prefab/0 | {
"file_path": "ml-agents/Project/Assets/ML-Agents/Examples/Soccer/Prefabs/StrikersVsGoalieField.prefab",
"repo_id": "ml-agents",
"token_count": 53803
} | 1,814 |
fileFormatVersion: 2
guid: f1322978b914041748ae9def364eeef1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
| ml-agents/Project/Assets/ML-Agents/Examples/Soccer/TFModels.meta/0 | {
"file_path": "ml-agents/Project/Assets/ML-Agents/Examples/Soccer/TFModels.meta",
"repo_id": "ml-agents",
"token_count": 67
} | 1,815 |
fileFormatVersion: 2
guid: f23c5f09c95ad48768a41974a2f1523c
timeCreated: 1506808980
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
| ml-agents/Project/Assets/ML-Agents/Examples/Sorter/Scenes/Sorter.unity.meta/0 | {
"file_path": "ml-agents/Project/Assets/ML-Agents/Examples/Sorter/Scenes/Sorter.unity.meta",
"repo_id": "ml-agents",
"token_count": 78
} | 1,816 |
fileFormatVersion: 2
guid: 618b2484c0fea4a9691069008604eea3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
| ml-agents/Project/Assets/ML-Agents/Examples/Walker/Demos.meta/0 | {
"file_path": "ml-agents/Project/Assets/ML-Agents/Examples/Walker/Demos.meta",
"repo_id": "ml-agents",
"token_count": 69
} | 1,817 |
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!... | ml-agents/Project/Assets/ML-Agents/Examples/Walker/Scenes/Walker.unity/0 | {
"file_path": "ml-agents/Project/Assets/ML-Agents/Examples/Walker/Scenes/Walker.unity",
"repo_id": "ml-agents",
"token_count": 20596
} | 1,818 |
fileFormatVersion: 2
guid: 1d53e87fe54dd4178b88cc1a23b11731
folderAsset: yes
timeCreated: 1517446674
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
| ml-agents/Project/Assets/ML-Agents/Examples/WallJump/Scenes.meta/0 | {
"file_path": "ml-agents/Project/Assets/ML-Agents/Examples/WallJump/Scenes.meta",
"repo_id": "ml-agents",
"token_count": 83
} | 1,819 |
fileFormatVersion: 2
guid: 07206274aded54b3991a277fedbaa2b2
folderAsset: yes
timeCreated: 1508478093
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
| ml-agents/Project/Assets/ML-Agents/Examples/Worm/Prefabs.meta/0 | {
"file_path": "ml-agents/Project/Assets/ML-Agents/Examples/Worm/Prefabs.meta",
"repo_id": "ml-agents",
"token_count": 73
} | 1,820 |
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!... | ml-agents/Project/Assets/ML-Agents/TestScenes/TestCompressedGrid/TestGridCompressed.unity/0 | {
"file_path": "ml-agents/Project/Assets/ML-Agents/TestScenes/TestCompressedGrid/TestGridCompressed.unity",
"repo_id": "ml-agents",
"token_count": 8708
} | 1,821 |
# ML-Agents Extensions
See the [package documentation](Documentation~/com.unity.ml-agents.extensions.md) for more information
| ml-agents/com.unity.ml-agents.extensions/README.md/0 | {
"file_path": "ml-agents/com.unity.ml-agents.extensions/README.md",
"repo_id": "ml-agents",
"token_count": 35
} | 1,822 |
fileFormatVersion: 2
guid: aa311fde3dac44f3b7998bb7fee77225
timeCreated: 1611356491 | ml-agents/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/Vector2InputActionAdaptor.cs.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/Vector2InputActionAdaptor.cs.meta",
"repo_id": "ml-agents",
"token_count": 40
} | 1,823 |
#if UNITY_2020_1_OR_NEWER
using System.Collections.Generic;
using UnityEngine;
using Unity.MLAgents.Sensors;
namespace Unity.MLAgents.Extensions.Sensors
{
public class ArticulationBodyJointExtractor : IJointExtractor
{
ArticulationBody m_Body;
public ArticulationBodyJointExtractor(Articulatio... | ml-agents/com.unity.ml-agents.extensions/Runtime/Sensors/ArticulationBodyJointExtractor.cs/0 | {
"file_path": "ml-agents/com.unity.ml-agents.extensions/Runtime/Sensors/ArticulationBodyJointExtractor.cs",
"repo_id": "ml-agents",
"token_count": 2857
} | 1,824 |
using UnityEngine;
using Unity.MLAgents.Sensors;
namespace Unity.MLAgents.Extensions.Sensors
{
public class RigidBodyJointExtractor : IJointExtractor
{
Rigidbody m_Body;
Joint m_Joint;
public RigidBodyJointExtractor(Rigidbody body)
{
m_Body = body;
m_Joi... | ml-agents/com.unity.ml-agents.extensions/Runtime/Sensors/RigidBodyJointExtractor.cs/0 | {
"file_path": "ml-agents/com.unity.ml-agents.extensions/Runtime/Sensors/RigidBodyJointExtractor.cs",
"repo_id": "ml-agents",
"token_count": 995
} | 1,825 |
fileFormatVersion: 2
guid: ae2012c098aa4b57ab09dbf72bcd4efe
timeCreated: 1613074622 | ml-agents/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/DoubleInputActionAdaptorTests.cs.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/DoubleInputActionAdaptorTests.cs.meta",
"repo_id": "ml-agents",
"token_count": 40
} | 1,826 |
fileFormatVersion: 2
guid: be1c02c37007345aa8ad2e44603852b2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
| ml-agents/com.unity.ml-agents.extensions/Tests/Runtime/RuntimeExampleTest.cs.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents.extensions/Tests/Runtime/RuntimeExampleTest.cs.meta",
"repo_id": "ml-agents",
"token_count": 95
} | 1,827 |
{
"name": "Unity.ML-Agents.Extensions.Tests",
"references": [
"Unity.ML-Agents.Extensions",
"Unity.ML-Agents"
],
"optionalUnityReferences": [
"TestAssemblies"
],
"includePlatforms": [],
"excludePlatforms": []
}
| ml-agents/com.unity.ml-agents.extensions/Tests/Runtime/Unity.ML-Agents.Extensions.Tests.asmdef/0 | {
"file_path": "ml-agents/com.unity.ml-agents.extensions/Tests/Runtime/Unity.ML-Agents.Extensions.Tests.asmdef",
"repo_id": "ml-agents",
"token_count": 125
} | 1,828 |
fileFormatVersion: 2
guid: c3b291e1cd0c64781861652b579d0ac1
timeCreated: 1503270350
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
| ml-agents/com.unity.ml-agents/Editor/AgentEditor.cs.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Editor/AgentEditor.cs.meta",
"repo_id": "ml-agents",
"token_count": 101
} | 1,829 |
{
"name": "Unity.ML-Agents.Editor",
"rootNamespace": "",
"references": [
"Unity.ML-Agents",
"Unity.ML-Agents.CommunicatorObjects",
"Unity.Sentis"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences... | ml-agents/com.unity.ml-agents/Editor/Unity.ML-Agents.Editor.asmdef/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Editor/Unity.ML-Agents.Editor.asmdef",
"repo_id": "ml-agents",
"token_count": 410
} | 1,830 |
fileFormatVersion: 2
guid: 7eeb863bd08ba4388829c23da03a714f
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
... | ml-agents/com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle.meta",
"repo_id": "ml-agents",
"token_count": 1234
} | 1,831 |
fileFormatVersion: 2
guid: 26733e59183b6479e8f0e892a8bf09a4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
| ml-agents/com.unity.ml-agents/Runtime/Actuators.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Runtime/Actuators.meta",
"repo_id": "ml-agents",
"token_count": 71
} | 1,832 |
fileFormatVersion: 2
guid: e3d7ef9a9a5043549cc5c0bbee520810
timeCreated: 1613514041 | ml-agents/com.unity.ml-agents/Runtime/Actuators/IBuiltInActuator.cs.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Runtime/Actuators/IBuiltInActuator.cs.meta",
"repo_id": "ml-agents",
"token_count": 41
} | 1,833 |
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Unity.MLAgents.Actuators;
using Unity.MLAgents.Sensors;
using UnityEngine;
#if MLA_UNITY_ANALYTICS_MODULE
#if ENABLE_CLOUD_SERVICES_ANALYTICS
using UnityEngine.Analytics;
#endif
#if UNITY_EDITOR
using UnityEditor.Analytics;
#endif
#endif
... | ml-agents/com.unity.ml-agents/Runtime/Analytics/TrainingAnalytics.cs/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Runtime/Analytics/TrainingAnalytics.cs",
"repo_id": "ml-agents",
"token_count": 4508
} | 1,834 |
using UnityEngine;
namespace Unity.MLAgents
{
public class UnityRLCapabilities
{
public bool BaseRLCapabilities;
public bool ConcatenatedPngObservations;
public bool CompressedChannelMapping;
public bool HybridActions;
public bool TrainingAnalytics;
public bool V... | ml-agents/com.unity.ml-agents/Runtime/Communicator/UnityRLCapabilities.cs/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Runtime/Communicator/UnityRLCapabilities.cs",
"repo_id": "ml-agents",
"token_count": 876
} | 1,835 |
fileFormatVersion: 2
guid: 90ce0b26bef35484890eac0633b85eed
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
| ml-agents/com.unity.ml-agents/Runtime/EnvironmentParameters.cs.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Runtime/EnvironmentParameters.cs.meta",
"repo_id": "ml-agents",
"token_count": 93
} | 1,836 |
fileFormatVersion: 2
guid: 9949df411f7112bb290948f924e4c603
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
| ml-agents/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/TrainingAnalytics.cs.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/TrainingAnalytics.cs.meta",
"repo_id": "ml-agents",
"token_count": 93
} | 1,837 |
using System;
using System.Collections.Generic;
using System.Linq;
using Unity.Sentis;
using Unity.MLAgents.Actuators;
using Unity.MLAgents.Sensors;
using Unity.MLAgents.Policies;
namespace Unity.MLAgents.Inference
{
/// <summary>
/// Prepares the Tensors for the Learning Brain and exposes a list of failed che... | ml-agents/com.unity.ml-agents/Runtime/Inference/SentisModelParamLoader.cs/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Runtime/Inference/SentisModelParamLoader.cs",
"repo_id": "ml-agents",
"token_count": 18855
} | 1,838 |
fileFormatVersion: 2
guid: 5c9e297dad748408db9e5ce26b940fe3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
| ml-agents/com.unity.ml-agents/Runtime/Inference/Utils/Multinomial.cs.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Runtime/Inference/Utils/Multinomial.cs.meta",
"repo_id": "ml-agents",
"token_count": 93
} | 1,839 |
fileFormatVersion: 2
guid: 530d2f105aa145bd8a00e021bdd925fd
timeCreated: 1600906676 | ml-agents/com.unity.ml-agents/Runtime/Integrations/Match3/Match3SensorComponent.cs.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Runtime/Integrations/Match3/Match3SensorComponent.cs.meta",
"repo_id": "ml-agents",
"token_count": 37
} | 1,840 |
using System;
using System.Collections.Generic;
using Unity.MLAgents.Actuators;
using Unity.MLAgents.Sensors;
namespace Unity.MLAgents.Policies
{
/// <summary>
/// IPolicy is connected to a single Agent. Each time the agent needs
/// a decision, it will request a decision to the Policy. The decision
//... | ml-agents/com.unity.ml-agents/Runtime/Policies/IPolicy.cs/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Runtime/Policies/IPolicy.cs",
"repo_id": "ml-agents",
"token_count": 405
} | 1,841 |
fileFormatVersion: 2
guid: 87820d9eb927c4fa483dff9289d983f1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
| ml-agents/com.unity.ml-agents/Runtime/Sensors/IGridPerception.cs.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Runtime/Sensors/IGridPerception.cs.meta",
"repo_id": "ml-agents",
"token_count": 96
} | 1,842 |
fileFormatVersion: 2
guid: 45243967d8c0419b953c02bccb7c2768
timeCreated: 1573087062 | ml-agents/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensorComponentBase.cs.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensorComponentBase.cs.meta",
"repo_id": "ml-agents",
"token_count": 40
} | 1,843 |
namespace Unity.MLAgents.Sensors.Reflection
{
/// <summary>
/// Sensor that wraps a Vector2 field or property of an object, and returns
/// that as an observation.
/// </summary>
internal class Vector2ReflectionSensor : ReflectionSensorBase
{
public Vector2ReflectionSensor(ReflectionSens... | ml-agents/com.unity.ml-agents/Runtime/Sensors/Reflection/Vector2ReflectionSensor.cs/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Runtime/Sensors/Reflection/Vector2ReflectionSensor.cs",
"repo_id": "ml-agents",
"token_count": 257
} | 1,844 |
using System.Collections.Generic;
using System.Collections.ObjectModel;
using UnityEngine;
namespace Unity.MLAgents.Sensors
{
/// <summary>
/// A sensor implementation for vector observations.
/// </summary>
public class VectorSensor : ISensor, IBuiltInSensor
{
// TODO use float[] instead
... | ml-agents/com.unity.ml-agents/Runtime/Sensors/VectorSensor.cs/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Runtime/Sensors/VectorSensor.cs",
"repo_id": "ml-agents",
"token_count": 3277
} | 1,845 |
fileFormatVersion: 2
guid: 85e0054f8e64b47309646d35f8851f81
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
| ml-agents/com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef.meta",
"repo_id": "ml-agents",
"token_count": 65
} | 1,846 |
using System;
using NUnit.Framework;
using Unity.MLAgents.Actuators;
namespace Unity.MLAgents.Tests.Actuators
{
[TestFixture]
public class ActionSegmentTests
{
[Test]
public void TestConstruction()
{
var floatArray = new[] { 1f, 2f, 3f, 4f, 5f, 6f, 7f };
Asse... | ml-agents/com.unity.ml-agents/Tests/Editor/Actuators/ActionSegmentTests.cs/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Tests/Editor/Actuators/ActionSegmentTests.cs",
"repo_id": "ml-agents",
"token_count": 1071
} | 1,847 |
fileFormatVersion: 2
guid: 70b8f1544bc34b4e8f1bc1068c64f01c
timeCreated: 1610419546 | ml-agents/com.unity.ml-agents/Tests/Editor/Analytics/TrainingAnalyticsTest.cs.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Tests/Editor/Analytics/TrainingAnalyticsTest.cs.meta",
"repo_id": "ml-agents",
"token_count": 42
} | 1,848 |
using System.Collections.Generic;
using Unity.Sentis;
using NUnit.Framework;
using Unity.MLAgents.Actuators;
using Unity.MLAgents.Inference;
namespace Unity.MLAgents.Tests
{
public class DiscreteActionOutputApplierTest
{
[Test]
public void TestDiscreteApply()
{
var actionSpe... | ml-agents/com.unity.ml-agents/Tests/Editor/Inference/DiscreteActionOutputApplierTest.cs/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Tests/Editor/Inference/DiscreteActionOutputApplierTest.cs",
"repo_id": "ml-agents",
"token_count": 1657
} | 1,849 |
using System;
using System.Collections.Generic;
using UnityEngine;
using NUnit.Framework;
using Unity.MLAgents.Integrations.Match3;
namespace Unity.MLAgents.Tests.Integrations.Match3
{
internal class StringBoard : AbstractBoard
{
internal int MaxRows;
internal int MaxColumns;
internal i... | ml-agents/com.unity.ml-agents/Tests/Editor/Integrations/Match3/AbstractBoardTests.cs/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Tests/Editor/Integrations/Match3/AbstractBoardTests.cs",
"repo_id": "ml-agents",
"token_count": 3653
} | 1,850 |
fileFormatVersion: 2
guid: df271cac120e4d6893b14599fa8eb64d
timeCreated: 1617813392 | ml-agents/com.unity.ml-agents/Tests/Editor/Policies.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Tests/Editor/Policies.meta",
"repo_id": "ml-agents",
"token_count": 38
} | 1,851 |
fileFormatVersion: 2
guid: c2a71036ddec4ba4bf83c5e8ba1b8daa
timeCreated: 1610574895 | ml-agents/com.unity.ml-agents/Tests/Editor/TrainingAnalyticsSideChannelTests.cs.meta/0 | {
"file_path": "ml-agents/com.unity.ml-agents/Tests/Editor/TrainingAnalyticsSideChannelTests.cs.meta",
"repo_id": "ml-agents",
"token_count": 43
} | 1,852 |
behaviors:
Crawler:
trainer_type: ppo
hyperparameters:
batch_size: 2024
buffer_size: 20240
learning_rate: 0.0003
beta: 0.005
epsilon: 0.2
lambd: 0.95
num_epoch: 3
learning_rate_schedule: linear
network_settings:
normalize: true
hidden_units: 512
... | ml-agents/config/imitation/Crawler.yaml/0 | {
"file_path": "ml-agents/config/imitation/Crawler.yaml",
"repo_id": "ml-agents",
"token_count": 500
} | 1,853 |
default_settings:
trainer_type: ppo
hyperparameters:
batch_size: 16
buffer_size: 120
learning_rate: 0.0003
beta: 0.005
epsilon: 0.2
lambd: 0.99
num_epoch: 3
learning_rate_schedule: constant
network_settings:
normalize: true
hidden_units: 256
num_layers: 4
vis_encode... | ml-agents/config/ppo/Match3.yaml/0 | {
"file_path": "ml-agents/config/ppo/Match3.yaml",
"repo_id": "ml-agents",
"token_count": 460
} | 1,854 |
behaviors:
GridWorld:
trainer_type: sac
hyperparameters:
learning_rate: 0.0003
learning_rate_schedule: constant
batch_size: 128
buffer_size: 50000
buffer_init_steps: 1000
tau: 0.005
steps_per_update: 10.0
save_replay_buffer: false
init_entcoef: 0.5
r... | ml-agents/config/sac/GridWorld.yaml/0 | {
"file_path": "ml-agents/config/sac/GridWorld.yaml",
"repo_id": "ml-agents",
"token_count": 308
} | 1,855 |
# Frequently Asked Questions
## Installation problems
## Environment Permission Error
If you directly import your Unity environment without building it in the editor,
you might need to give it additional permissions to execute it.
If you receive such a permission error on macOS, run:
```sh
chmod -R 755 *.app
```
... | ml-agents/docs/FAQ.md/0 | {
"file_path": "ml-agents/docs/FAQ.md",
"repo_id": "ml-agents",
"token_count": 838
} | 1,856 |
# ML-Agents Toolkit Overview
**Table of Contents**
- [Running Example: Training NPC Behaviors](#running-example-training-npc-behaviors)
- [Key Components](#key-components)
- [Training Modes](#training-modes)
- [Built-in Training and Inference](#built-in-training-and-inference)
- [Cross-Platform Inference](#cros... | ml-agents/docs/ML-Agents-Overview.md/0 | {
"file_path": "ml-agents/docs/ML-Agents-Overview.md",
"repo_id": "ml-agents",
"token_count": 11221
} | 1,857 |
# Sentis
The ML-Agents Toolkit allows you to use pre-trained neural network models inside
your Unity games. This support is possible thanks to the
[Sentis](https://docs.unity3d.com/Packages/com.unity.sentis@latest/index.html)
(codenamed Sentis). Sentis uses
[compute shaders](https://docs.unity3d.com/Manual/class-Compu... | ml-agents/docs/Sentis.md/0 | {
"file_path": "ml-agents/docs/Sentis.md",
"repo_id": "ml-agents",
"token_count": 655
} | 1,858 |
/* The standard CSS for doxygen 1.8.14 */
body, table, div, p, dl {
font: 400 14px/22px Roboto,sans-serif;
}
p.reference, p.definition {
font: 400 14px/22px Roboto,sans-serif;
}
/* @group Heading Levels */
h1.groupheader {
font-size: 150%;
}
.title {
font: 400 14px/28px Roboto,sans-serif;
font-size: 150%;
fo... | ml-agents/docs/doxygen/doxygenbase.css/0 | {
"file_path": "ml-agents/docs/doxygen/doxygenbase.css",
"repo_id": "ml-agents",
"token_count": 13348
} | 1,859 |
# ML-Agents 용 도커 사용법
도커를 사용해 추론과 학습을 하고자하는 Windows와 Mac 사용자를 위한 솔루션을 제공합니다.
이것은 Python과 TensorFlow 설치를 피하고자 하는 분에게 매력적인 옵션이 될 것입니다. 현재 설정은 TensorFlow와 Unity가 _CPU를 통해서만_
계산하도록 합니다. 따라서 도커 시뮬레이션은 GPU를 사용하지 않고 시각적 렌더링을 위해 [`Xvfb`](https://en.wikipedia.org/wiki/Xvfb)를 사용합니다.
`Xvfb`는 `ML-Agents`(또는 다른 응용 프로그램)가 가상으로 렌더링을... | ml-agents/localized_docs/KR/docs/Using-Docker.md/0 | {
"file_path": "ml-agents/localized_docs/KR/docs/Using-Docker.md",
"repo_id": "ml-agents",
"token_count": 5712
} | 1,860 |
# @generated by generate_proto_mypy_stubs.py. Do not edit!
import sys
from google.protobuf.descriptor import (
Descriptor as google___protobuf___descriptor___Descriptor,
)
from google.protobuf.message import (
Message as google___protobuf___message___Message,
)
from typing import (
Optional as typing___O... | ml-agents/ml-agents-envs/mlagents_envs/communicator_objects/demonstration_meta_pb2.pyi/0 | {
"file_path": "ml-agents/ml-agents-envs/mlagents_envs/communicator_objects/demonstration_meta_pb2.pyi",
"repo_id": "ml-agents",
"token_count": 729
} | 1,861 |
# @generated by generate_proto_mypy_stubs.py. Do not edit!
import sys
from google.protobuf.descriptor import (
Descriptor as google___protobuf___descriptor___Descriptor,
)
from google.protobuf.message import (
Message as google___protobuf___message___Message,
)
from mlagents_envs.communicator_objects.unity_r... | ml-agents/ml-agents-envs/mlagents_envs/communicator_objects/unity_output_pb2.pyi/0 | {
"file_path": "ml-agents/ml-agents-envs/mlagents_envs/communicator_objects/unity_output_pb2.pyi",
"repo_id": "ml-agents",
"token_count": 909
} | 1,862 |
from typing import Optional, Union, List
from mlagents_envs import logging_util
from mlagents_envs.exception import UnityWorkerInUseException
from mlagents_envs.registry import default_registry
from mlagents_envs.side_channel.engine_configuration_channel import (
EngineConfigurationChannel,
)
from mlagents_envs.si... | ml-agents/ml-agents-envs/mlagents_envs/envs/pettingzoo_env_factory.py/0 | {
"file_path": "ml-agents/ml-agents-envs/mlagents_envs/envs/pettingzoo_env_factory.py",
"repo_id": "ml-agents",
"token_count": 824
} | 1,863 |
import sys
import uuid
import mlagents_envs
from mlagents_envs.exception import UnityCommunicationException
from mlagents_envs.side_channel import SideChannel, IncomingMessage, OutgoingMessage
from mlagents_envs.communicator_objects.training_analytics_pb2 import (
TrainingEnvironmentInitialized,
)
from google.prot... | ml-agents/ml-agents-envs/mlagents_envs/side_channel/default_training_analytics_side_channel.py/0 | {
"file_path": "ml-agents/ml-agents-envs/mlagents_envs/side_channel/default_training_analytics_side_channel.py",
"repo_id": "ml-agents",
"token_count": 728
} | 1,864 |
import os
from unittest import mock
import pytest
from mlagents_envs.environment import UnityEnvironment
from mlagents_envs.base_env import DecisionSteps, TerminalSteps, ActionTuple
from mlagents_envs.exception import UnityEnvironmentException, UnityActionException
from mlagents_envs.mock_communicator import MockCommu... | ml-agents/ml-agents-envs/tests/test_envs.py/0 | {
"file_path": "ml-agents/ml-agents-envs/tests/test_envs.py",
"repo_id": "ml-agents",
"token_count": 2494
} | 1,865 |
from typing import Optional
import os
def get_num_threads_to_use() -> Optional[int]:
"""
Gets the number of threads to use. For most problems, 4 is all you
need, but for smaller machines, we'd like to scale to less than that.
By default, PyTorch uses 1/2 of the available cores.
"""
num_cpus =... | ml-agents/ml-agents/mlagents/torch_utils/cpu_utils.py/0 | {
"file_path": "ml-agents/ml-agents/mlagents/torch_utils/cpu_utils.py",
"repo_id": "ml-agents",
"token_count": 574
} | 1,866 |
# # Unity ML-Agents Toolkit
# ## ML-Agent Learning (Ghost Trainer)
from collections import defaultdict
from typing import Deque, Dict, DefaultDict, List
import numpy as np
from mlagents_envs.logging_util import get_logger
from mlagents_envs.base_env import BehaviorSpec
from mlagents.trainers.policy import Policy
fr... | ml-agents/ml-agents/mlagents/trainers/ghost/trainer.py/0 | {
"file_path": "ml-agents/ml-agents/mlagents/trainers/ghost/trainer.py",
"repo_id": "ml-agents",
"token_count": 8827
} | 1,867 |
from typing import Dict, cast
import attr
from mlagents.torch_utils import torch, default_device
from mlagents.trainers.buffer import AgentBuffer, BufferKey, RewardSignalUtil
from mlagents_envs.timers import timed
from mlagents.trainers.policy.torch_policy import TorchPolicy
from mlagents.trainers.optimizer.torch_op... | ml-agents/ml-agents/mlagents/trainers/ppo/optimizer_torch.py/0 | {
"file_path": "ml-agents/ml-agents/mlagents/trainers/ppo/optimizer_torch.py",
"repo_id": "ml-agents",
"token_count": 3493
} | 1,868 |
from unittest.mock import MagicMock, patch
import pytest
from mlagents.torch_utils import torch
from mlagents.trainers.trainer_controller import TrainerController
from mlagents.trainers.environment_parameter_manager import EnvironmentParameterManager
from mlagents.trainers.ghost.controller import GhostController
@py... | ml-agents/ml-agents/mlagents/trainers/tests/test_trainer_controller.py/0 | {
"file_path": "ml-agents/ml-agents/mlagents/trainers/tests/test_trainer_controller.py",
"repo_id": "ml-agents",
"token_count": 1708
} | 1,869 |
import pytest
from mlagents.torch_utils import torch
from mlagents.trainers.torch_entities.decoders import ValueHeads
def test_valueheads():
stream_names = [f"reward_signal_{num}" for num in range(5)]
input_size = 5
batch_size = 4
# Test default 1 value per head
value_heads = ValueHeads(stream_n... | ml-agents/ml-agents/mlagents/trainers/tests/torch_entities/test_decoders.py/0 | {
"file_path": "ml-agents/ml-agents/mlagents/trainers/tests/torch_entities/test_decoders.py",
"repo_id": "ml-agents",
"token_count": 393
} | 1,870 |
import pytest
import attr
from mlagents.trainers.tests.simple_test_envs import (
SimpleEnvironment,
MultiAgentEnvironment,
MemoryEnvironment,
RecordEnvironment,
)
from mlagents.trainers.demo_loader import write_demo
from mlagents.trainers.settings import (
NetworkSettings,
SelfPlaySettings,
... | ml-agents/ml-agents/mlagents/trainers/tests/torch_entities/test_simple_rl.py/0 | {
"file_path": "ml-agents/ml-agents/mlagents/trainers/tests/torch_entities/test_simple_rl.py",
"repo_id": "ml-agents",
"token_count": 8497
} | 1,871 |
from typing import Optional, Dict, List
import numpy as np
from mlagents.torch_utils import torch, default_device
from mlagents.trainers.buffer import AgentBuffer, BufferKey
from mlagents.trainers.torch_entities.components.reward_providers.base_reward_provider import (
BaseRewardProvider,
)
from mlagents.trainers.... | ml-agents/ml-agents/mlagents/trainers/torch_entities/components/reward_providers/gail_reward_provider.py/0 | {
"file_path": "ml-agents/ml-agents/mlagents/trainers/torch_entities/components/reward_providers/gail_reward_provider.py",
"repo_id": "ml-agents",
"token_count": 5175
} | 1,872 |
import os
from typing import Dict
from mlagents_envs.logging_util import get_logger
from mlagents.trainers.environment_parameter_manager import EnvironmentParameterManager
from mlagents.trainers.exception import TrainerConfigError
from mlagents.trainers.trainer import Trainer
from mlagents.trainers.ghost.trainer impor... | ml-agents/ml-agents/mlagents/trainers/trainer/trainer_factory.py/0 | {
"file_path": "ml-agents/ml-agents/mlagents/trainers/trainer/trainer_factory.py",
"repo_id": "ml-agents",
"token_count": 2025
} | 1,873 |
import argparse
import numpy as np
from mlagents_envs.environment import UnityEnvironment
EPSILON = 0.001
def test_run_environment(env_name):
"""
Run the low-level API test of compressed sensors using the specified environment
:param env_name: Name of the Unity environment binary to launch
"""
e... | ml-agents/ml-agents/tests/yamato/scripts/run_compressed_sensor.py/0 | {
"file_path": "ml-agents/ml-agents/tests/yamato/scripts/run_compressed_sensor.py",
"repo_id": "ml-agents",
"token_count": 549
} | 1,874 |
syntax = "proto3";
option csharp_namespace = "Unity.MLAgents.CommunicatorObjects";
package communicator_objects;
message CustomResetParametersProto {
}
| ml-agents/protobuf-definitions/proto/mlagents_envs/communicator_objects/custom_reset_parameters.proto/0 | {
"file_path": "ml-agents/protobuf-definitions/proto/mlagents_envs/communicator_objects/custom_reset_parameters.proto",
"repo_id": "ml-agents",
"token_count": 49
} | 1,875 |
[coverage:run]
omit = */tests/*
[coverage:report]
# Run "pytest --cov=ml-agents --cov=ml-agents-envs --cov=gym-unity" to see the current coverage percentage.
# Run the above plus "--cov-report html" to get a nice visualization of what is/isn't covered in html format.
fail_under = 60
[flake8]
# black will apply a lin... | ml-agents/setup.cfg/0 | {
"file_path": "ml-agents/setup.cfg",
"repo_id": "ml-agents",
"token_count": 336
} | 1,876 |
using System;
using System.IO;
using System.Security.Cryptography;
namespace XLua
{
public class FilesSignature
{
static void usage()
{
Console.WriteLine("FilesSignature from_path to_path");
}
static void doSignature(string from, string to, SHA1 sha, RSACryptoServic... | xLua/General/Src/FilesSignature.cs/0 | {
"file_path": "xLua/General/Src/FilesSignature.cs",
"repo_id": "xLua",
"token_count": 990
} | 1,877 |
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft... | xLua/General/vs2013/XLuaTest.csproj/0 | {
"file_path": "xLua/General/vs2013/XLuaTest.csproj",
"repo_id": "xLua",
"token_count": 993
} | 1,878 |
strValue = "D.lua" | xLua/Test/UnitTest/StreamingAssets/D.lua/0 | {
"file_path": "xLua/Test/UnitTest/StreamingAssets/D.lua",
"repo_id": "xLua",
"token_count": 8
} | 1,879 |
fileFormatVersion: 2
guid: 3def27a586fdac545a71c421a4593354
timeCreated: 1483528414
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
| xLua/Test/UnitTest/StreamingAssets/luaCallCsReflect.lua.meta/0 | {
"file_path": "xLua/Test/UnitTest/StreamingAssets/luaCallCsReflect.lua.meta",
"repo_id": "xLua",
"token_count": 67
} | 1,880 |
fileFormatVersion: 2
guid: d3e28212fb5931d44bc37dcd4fd0127f
folderAsset: yes
timeCreated: 1483527547
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
| xLua/Test/UnitTest/xLuaTest/CSharpCallLua.meta/0 | {
"file_path": "xLua/Test/UnitTest/xLuaTest/CSharpCallLua.meta",
"repo_id": "xLua",
"token_count": 75
} | 1,881 |
#if !XLUA_GENERAL
using UnityEngine;
#endif
using System.Collections;
using System.Collections.Generic;
using XLua;
using System;
using System.IO;
public class LuaEnvSingletonForTest {
static private LuaEnv instance = null;
static public LuaEnv Instance
{
get
{
if(instance == null)
{
instance = new... | xLua/Test/UnitTest/xLuaTest/CSharpCallLua/TCForTestCSCallLua.cs/0 | {
"file_path": "xLua/Test/UnitTest/xLuaTest/CSharpCallLua/TCForTestCSCallLua.cs",
"repo_id": "xLua",
"token_count": 37173
} | 1,882 |
<!-- $Id: lua.man,v 1.11 2006/01/06 16:03:34 lhf Exp $ -->
<HTML>
<HEAD>
<TITLE>LUA man page</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="lua.css">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2>NAME</H2>
lua - Lua interpreter
<H2>SYNOPSIS</H2>
<B>lua</B>
[
<I>options</I>
]
[
<I>script</I>
[
<I>args</I>
]
]
<H2>DESCRIP... | xLua/build/lua-5.1.5/doc/lua.html/0 | {
"file_path": "xLua/build/lua-5.1.5/doc/lua.html",
"repo_id": "xLua",
"token_count": 1372
} | 1,883 |
# makefile for building Lua
# see ../INSTALL for installation instructions
# see ../Makefile and luaconf.h for further customization
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
# Your platform. See PLATS for possible values.
PLAT= none
CC= gcc
CFLAGS= -O2 -Wall $(MYCFLAGS)
AR= ar ... | xLua/build/lua-5.1.5/src/Makefile/0 | {
"file_path": "xLua/build/lua-5.1.5/src/Makefile",
"repo_id": "xLua",
"token_count": 3243
} | 1,884 |
/*
** $Id: lgc.c,v 2.38.1.2 2011/03/18 18:05:38 roberto Exp $
** Garbage Collector
** See Copyright Notice in lua.h
*/
#include <string.h>
#define lgc_c
#define LUA_CORE
#include "lua.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lgc.h"
#include "lmem.h"
#include "lobject.h"
#include "lstate.... | xLua/build/lua-5.1.5/src/lgc.c/0 | {
"file_path": "xLua/build/lua-5.1.5/src/lgc.c",
"repo_id": "xLua",
"token_count": 9245
} | 1,885 |
/*
** $Id: lparser.c,v 2.42.1.4 2011/10/21 19:31:42 roberto Exp $
** Lua Parser
** See Copyright Notice in lua.h
*/
#include <string.h>
#define lparser_c
#define LUA_CORE
#include "lua.h"
#include "lcode.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "llex.h"
#include "lmem.h"
#include "lobjec... | xLua/build/lua-5.1.5/src/lparser.c/0 | {
"file_path": "xLua/build/lua-5.1.5/src/lparser.c",
"repo_id": "xLua",
"token_count": 16150
} | 1,886 |
/*
** $Id: lualib.h,v 1.36.1.1 2007/12/27 13:02:25 roberto Exp $
** Lua standard libraries
** See Copyright Notice in lua.h
*/
#ifndef lualib_h
#define lualib_h
#include "lua.h"
/* Key to file-handle type */
#define LUA_FILEHANDLE "FILE*"
#define LUA_COLIBNAME "coroutine"
LUALIB_API int (luaopen_base) (lua_Stat... | xLua/build/lua-5.1.5/src/lualib.h/0 | {
"file_path": "xLua/build/lua-5.1.5/src/lualib.h",
"repo_id": "xLua",
"token_count": 449
} | 1,887 |
This is Lua 5.3.4, released on 12 Jan 2017.
For installation instructions, license details, and
further information about Lua, see doc/readme.html.
| xLua/build/lua-5.3.4/README/0 | {
"file_path": "xLua/build/lua-5.3.4/README",
"repo_id": "xLua",
"token_count": 42
} | 1,888 |
/*
** $Id: lapi.c $
** Lua API
** See Copyright Notice in lua.h
*/
#define lapi_c
#define LUA_CORE
#include "lprefix.h"
#include <limits.h>
#include <stdarg.h>
#include <string.h>
#include "lua.h"
#include "lapi.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lgc.h"
#include "lmem.h"
#include... | xLua/build/lua-5.4.1/src/lapi.c/0 | {
"file_path": "xLua/build/lua-5.4.1/src/lapi.c",
"repo_id": "xLua",
"token_count": 16281
} | 1,889 |
/*
** $Id: lfunc.c $
** Auxiliary functions to manipulate prototypes and closures
** See Copyright Notice in lua.h
*/
#define lfunc_c
#define LUA_CORE
#include "lprefix.h"
#include <stddef.h>
#include "lua.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lgc.h"
#include "lmem.h"
#include "lobj... | xLua/build/lua-5.4.1/src/lfunc.c/0 | {
"file_path": "xLua/build/lua-5.4.1/src/lfunc.c",
"repo_id": "xLua",
"token_count": 3752
} | 1,890 |
/*
** $Id: lopcodes.c $
** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h
*/
#define lopcodes_c
#define LUA_CORE
#include "lprefix.h"
#include "lopcodes.h"
/* ORDER OP */
LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
/* MM OT IT T A mode opcode */
opmode(0, 0, 0, 0, 1, iA... | xLua/build/lua-5.4.1/src/lopcodes.c/0 | {
"file_path": "xLua/build/lua-5.4.1/src/lopcodes.c",
"repo_id": "xLua",
"token_count": 2345
} | 1,891 |
/*
** $Id: ltm.h $
** Tag methods
** See Copyright Notice in lua.h
*/
#ifndef ltm_h
#define ltm_h
#include "lobject.h"
/*
* WARNING: if you change the order of this enumeration,
* grep "ORDER TM" and "ORDER OP"
*/
typedef enum {
TM_INDEX,
TM_NEWINDEX,
TM_GC,
TM_MODE,
TM_LEN,
TM_EQ, /* last tag method ... | xLua/build/lua-5.4.1/src/ltm.h/0 | {
"file_path": "xLua/build/lua-5.4.1/src/ltm.h",
"repo_id": "xLua",
"token_count": 1456
} | 1,892 |
mkdir build32 & pushd build32
cmake -DLUAC_COMPATIBLE_FORMAT=ON -G "Visual Studio 14 2015" ..
IF %ERRORLEVEL% NEQ 0 cmake -DLUAC_COMPATIBLE_FORMAT=ON -G "Visual Studio 15 2017" ..
popd
cmake --build build32 --config Release
pause | xLua/build/luac/make_win32.bat/0 | {
"file_path": "xLua/build/luac/make_win32.bat",
"repo_id": "xLua",
"token_count": 85
} | 1,893 |
/*
** Auxiliary library for the Lua/C API.
** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
**
** Major parts taken verbatim or adapted from the Lua interpreter.
** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h
*/
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>... | xLua/build/luajit-2.1.0b2/src/lib_aux.c/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/src/lib_aux.c",
"repo_id": "xLua",
"token_count": 4066
} | 1,894 |
/*
** Public Lua/C API.
** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
**
** Major portions taken verbatim or adapted from the Lua interpreter.
** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h
*/
#define lj_api_c
#define LUA_CORE
#include "lj_obj.h"
#include "lj_gc.h"... | xLua/build/luajit-2.1.0b2/src/lj_api.c/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/src/lj_api.c",
"repo_id": "xLua",
"token_count": 14764
} | 1,895 |
/*
** Fast function call recorder.
** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
*/
#define lj_ffrecord_c
#define LUA_CORE
#include "lj_obj.h"
#if LJ_HASJIT
#include "lj_err.h"
#include "lj_str.h"
#include "lj_tab.h"
#include "lj_frame.h"
#include "lj_bc.h"
#include "lj_ff.h"
#include "lj_i... | xLua/build/luajit-2.1.0b2/src/lj_ffrecord.c/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/src/lj_ffrecord.c",
"repo_id": "xLua",
"token_count": 18716
} | 1,896 |
/*
** ARM64 instruction emitter.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
**
** Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
** Sponsored by Cisco Systems, Inc.
*/
/* -- Constant encoding --------------------------------------------------- */
static uint64_t get_k64v... | xLua/build/luajit-2.1.0b3/src/lj_emit_arm64.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_emit_arm64.h",
"repo_id": "xLua",
"token_count": 6480
} | 1,897 |
/*
** Object de/serialization.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#define lj_serialize_c
#define LUA_CORE
#include "lj_obj.h"
#if LJ_HASBUFFER
#include "lj_err.h"
#include "lj_buf.h"
#include "lj_str.h"
#include "lj_tab.h"
#include "lj_udata.h"
#if LJ_HASFFI
#include "lj_ctype.... | xLua/build/luajit-2.1.0b3/src/lj_serialize.c/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_serialize.c",
"repo_id": "xLua",
"token_count": 8047
} | 1,898 |
#ifndef MIME_H
#define MIME_H
/*=========================================================================*\
* Core MIME support
* LuaSocket toolkit
*
* This module provides functions to implement transfer content encodings
* and formatting conforming to RFC 2045. It is used by mime.lua, which
* provide a higher level... | xLua/build/luasocket/mime.h/0 | {
"file_path": "xLua/build/luasocket/mime.h",
"repo_id": "xLua",
"token_count": 256
} | 1,899 |
#ifndef USOCKET_H
#define USOCKET_H
/*=========================================================================*\
* Socket compatibilization module for Unix
* LuaSocket toolkit
\*=========================================================================*/
/*==============================================================... | xLua/build/luasocket/usocket.h/0 | {
"file_path": "xLua/build/luasocket/usocket.h",
"repo_id": "xLua",
"token_count": 597
} | 1,900 |
set CUR_DIR=%~dp0
cd %CUR_DIR%
del /s/q buildnx64
mkdir buildnx64 & pushd buildnx64
rem fix for io_tmpfile & os_tmpname
echo #if !__ASSEMBLER__ > switch_fix.h
echo static inline struct _IO_FILE* tmpfile(){ return 0; } >> switch_fix.h
echo static inline char* tmpnam(char* n){ return 0; } >> switch_fix.h
echo #endif >> ... | xLua/build/make_nx64_lua53.bat/0 | {
"file_path": "xLua/build/make_nx64_lua53.bat",
"repo_id": "xLua",
"token_count": 410
} | 1,901 |
<!DOCTYPE html>
<html lang="en">
<head>
<title>介绍 — XLua</title>
<meta charset="utf-8">
<meta name="description" content="XLua">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="/xLua/public/css/page.css">
... | xLua/docs/public/v1/guide/index.html/0 | {
"file_path": "xLua/docs/public/v1/guide/index.html",
"repo_id": "xLua",
"token_count": 8348
} | 1,902 |
---
title: XLua的配置
type: guide
order: 100
---
## XLua的配置
xLua所有的配置都支持三种方式:`打标签`, `静态列表`, `动态列表`。
配置有两必须两建议:
* 列表方式均必须是static的字段/属性
* 列表方式均必须放到一个static类
* 建议不用标签方式
* 建议列表方式配置放Editor目录
### 打标签
xLua用白名单来指明生成哪些代码,而白名单通过attribute来配置,比如你想从lua调用c#的某个类,希望生成适配代码,你可以为这个类型打一个LuaCallCSharp标签:
~~~csharp
[LuaCallCSharp]
publi... | xLua/docs/source/src/v1/guide/configure.md/0 | {
"file_path": "xLua/docs/source/src/v1/guide/configure.md",
"repo_id": "xLua",
"token_count": 3681
} | 1,903 |
<article class="clearfix">
<%- page.content %>
<div class="footer">
发现错误?想参与编辑?
<a href="<%- theme.modify_github %><%- page.path.replace(/\.html$/, '.md') %>" target="_blank">
在 Github 上编辑此页!
</a>
</div>
</article>
<div class="sub-nav hiden-in-phone">
<dl id="sub-na... | xLua/docs/source/themes/catlib/layout/partials/article.ejs/0 | {
"file_path": "xLua/docs/source/themes/catlib/layout/partials/article.ejs",
"repo_id": "xLua",
"token_count": 293
} | 1,904 |
/*
(C) 2019 David Lettier
lettier.com
*/
#version 150
uniform vec2 pi;
uniform float osg_FrameTime;
uniform sampler2D colorTexture;
uniform vec2 enabled;
out vec4 fragColor;
void main() {
float amount = 0.01;
vec2 texSize = textureSize(colorTexture, 0).xy;
vec2 texCoord = gl_FragCoord.xy / texSize;
... | 3d-game-shaders-for-beginners/demonstration/shaders/fragment/film-grain.frag/0 | {
"file_path": "3d-game-shaders-for-beginners/demonstration/shaders/fragment/film-grain.frag",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 349
} | 0 |
/*
(C) 2019 David Lettier
lettier.com
*/
#version 150
uniform sampler2D colorTexture;
uniform sampler2D positionTexture;
uniform vec2 parameters;
uniform vec2 enabled;
out vec4 fragColor;
void main() {
// Must be odd.
int pixelSize = int(parameters.x);
vec2 texSize = textureSize(colorTexture, 0).xy;
... | 3d-game-shaders-for-beginners/demonstration/shaders/fragment/pixelize.frag/0 | {
"file_path": "3d-game-shaders-for-beginners/demonstration/shaders/fragment/pixelize.frag",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 353
} | 1 |
BSD 3-Clause License
Copyright (c) 2019, David Lettier
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions... | 3d-game-shaders-for-beginners/demonstration/src/LICENSE/0 | {
"file_path": "3d-game-shaders-for-beginners/demonstration/src/LICENSE",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 405
} | 2 |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="description" content="Interested in adding textures, lighting, shadows, normal maps, glowi... | 3d-game-shaders-for-beginners/docs/foam.html/0 | {
"file_path": "3d-game-shaders-for-beginners/docs/foam.html",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 6227
} | 3 |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="description" content="Interested in adding textures, lighting, shadows, normal maps, glowi... | 3d-game-shaders-for-beginners/docs/running-the-demo.html/0 | {
"file_path": "3d-game-shaders-for-beginners/docs/running-the-demo.html",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 4174
} | 4 |
[:arrow_backward:](sharpen.md)
[:arrow_double_up:](../README.md)
[:arrow_up_small:](#)
[:arrow_down_small:](#copyright)
[:arrow_forward:](film-grain.md)
# 3D Game Shaders For Beginners
## Dilation
<p align="center">
<img src="https://i.imgur.com/z751O74.gif" alt="Dilation" title="Dilation">
</p>
Dilation dilates or... | 3d-game-shaders-for-beginners/sections/dilation.md/0 | {
"file_path": "3d-game-shaders-for-beginners/sections/dilation.md",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 1482
} | 5 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef airsim_core_ClockFactory_hpp
#define airsim_core_ClockFactory_hpp
#include "ScalableClock.hpp"
#include <memory>
namespace msr
{
namespace airlib
{
class ClockFactory
{
public:
//output of thi... | AirSim/AirLib/include/common/ClockFactory.hpp/0 | {
"file_path": "AirSim/AirLib/include/common/ClockFactory.hpp",
"repo_id": "AirSim",
"token_count": 399
} | 6 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef airsim_core_StateReporterWrapper_hpp
#define airsim_core_StateReporterWrapper_hpp
#include <sstream>
#include <string>
#include <iomanip>
#include "common/Common.hpp"
#include "common_utils/OnlineStats.hpp"
#includ... | AirSim/AirLib/include/common/StateReporterWrapper.hpp/0 | {
"file_path": "AirSim/AirLib/include/common/StateReporterWrapper.hpp",
"repo_id": "AirSim",
"token_count": 1670
} | 7 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef commn_utils_sincos_hpp
#define commn_utils_sincos_hpp
#include <random>
namespace common_utils
{
template <typename TReturn, typename TDistribution, unsigned int Seed = 42>
class RandomGenerator
{
public:
//f... | AirSim/AirLib/include/common/common_utils/RandomGenerator.hpp/0 | {
"file_path": "AirSim/AirLib/include/common/common_utils/RandomGenerator.hpp",
"repo_id": "AirSim",
"token_count": 527
} | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.