게임에서 머신러닝이 이런식으로 활용될 수 있겠구나 식의 감 잡기에 좋은 내용이다.

유니티 머신러닝 툴킷은 2018년 오픈소스 프로젝트로 버전이 계속 0.x 이다가 2020년 5월에 정식 1.0이 되었다.

Unity ML-Agents Toolkit

https://github.com/Unity-Technologies/ml-agents

이미지 썸네일 삭제

Unity-Technologies/ml-agents

Unity Machine Learning Agents Toolkit. Contribute to Unity-Technologies/ml-agents development by creating an account on GitHub.

github.com

 

20개 정도 되는 머신러닝 샘플 들 소개.

Unity ML Samples (Example Learning Environments)

https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Learning-Environment-Examples.md

이미지 썸네일 삭제

Unity-Technologies/ml-agents

Unity Machine Learning Agents Toolkit. Contribute to Unity-Technologies/ml-agents development by creating an account on GitHub.

github.com

 

유니티 머신러닝 에이전트 라이브러리를 이용해서 테스트 샘플 로 주욱 따라 가며 배우기 좋은 내용.

펭귄 영역, 펭귄 에이전트, 펭귄 새끼, 물고기 어셋이 주어지고

펭귄 에이전트가 바다에 물고기를 가져다가 펭귄 새끼에게 많이 먹이는 게 목표.

펭귄 에이전트는 매 틱마다 목표 감지 센서를 돌리고

바다에서 물고기를 먹으면 Reward(1.0f) 올라가고 새끼에게 물고기를 내뱉어 먹이면

Reward(1.0f)로 올라가게 세팅 된다.

그럼 에이전트는 Reward가 가장 높게 행동 하는 방식.

https://www.immersivelimit.com/tutorials/unity-ml-agents-penguins

이미지 썸네일 삭제

Unity ML Agents | Penguins — Immersive Limit

In this Unity ML Agents tutorial you’ll learn how to use machine learning, specifically reinforcement learning in Unity to train penguins to find fish and feed their babies.

www.immersivelimit.com

 

펭귄 샘플 WorkThrough를 통해 배워가는 과정들을 개인 리파지토리.. ing.

초반 세팅으로 유니티 버전과 ML 라이브러리 버전을 맞추는 작업이 필요.

Unity version : 2019.4.6.f1 lts / Unity ML version : 0.8.2.

https://github.com/egoquat/MLTestUnity01

이미지 썸네일 삭제

egoquat/MLTestUnity01

Personal Unity ML Test Penguin samples. Unity version 2019.4.6f1 lts - egoquat/MLTestUnity01

github.com

 

'GameEngine > Unity' 카테고리의 다른 글

[link] Unity3D advanced references  (0) 2011.07.14

근래 Unity Engine으로 Navigation Mesh,Spline Curve 등 각 파트 구현하면서 좋은 참고가 되었고 지금고 되고 있는 유용한 
Code들이 많은곳들. 

원문 : http://www.unifycommunity.com/wiki/index.php?title=Scripts

...

Development

Debugging Scripts

  • DetectLeaks - a simple GUI script for displaying the amount of objects currently loaded by type
  • DebugConsole - A script to allow scrolling feedback from your scripts.
  • DebuggerX - A simple javascript singleton that allows you to send debug to the console or the GUI
  • DrawArrow - builds upon Debug.DrawRay() to add arrowheads at the tip
  • Profiler - a simple c# script for profiling the performance of scripts, based on tags
  • Reporter - a simple delayed action system info script that could be used for support purposes
  • UUnit - a Simple xUnit framework that can be run inside Unity.
  • SharpUnit - a unit testing framework adapted from UUnit but written in C#. Can also be run inside Unity3D.
  • NUnit - de-facto standard for unit testing in .NET

Performance Scripts

  • StaticPerformanceOptimization - A script that optimizes performance statically based on the users graphics card by dropping terrain resolution and quality settings
  • SpriteManager - A script that allows many independently-moving 2D sprites to be drawn using a single draw call. This is particularly useful to increase iPhone performance.
  • CombineSkinnedMeshes - A Script that allows to combine multiple skinned meshes to just one SkinnedMeshRenderer. Useful for Avatar System!
  • SkinMeshCombineUtility - Script to work with CombineSkinnedMeshes.
  • CombineChildrenBones - Similar to MeshMerger, this script combines MeshFilter meshes into a single skinned mesh and then tracks transform changes

 

Character Controller Scripts

  • A* Pathfinding - An A* pathfinding-system for out-of-the-box pathfinding in Unity.
  • AimDownSights - An expansion script for the FPSWalker that smoothly animates aiming down the sights of an attached gun model.
  • Biped Parts Finder - Editor script for search simplification of parts of a biped body.
  • Click To Move - Moves an object towards the mouse position when the Left Mouse Button is clicked
  • ClickCharacterController - Uses Locomotion to move a character to the point the Left Mouse button is clicked
  • DoubleJumpController - A hack for the 2d gameplay tutorial character controller script, it allows the character to make a second jump when jumping, or make a little jump when falling.
  • Finite State Machine - A simple Finite State Machine framework to control NPCs.
  • Force2D - Constrain a GameObject to move in two dimensions.
  • FPSWalkerEnhanced - Adds features to standard FPSWalker, such as sliding down slopes, falling damage, and walk/run modes
  • Gesture_Recognizer - A math based gesture recognition script.
  • GridMove - A controller for character movement typically seen in old-school 2D RPGs and strategy games.
  • HeadLookController - A component that can be used to make a character look towards a specified point in space, smoothly turning towards it with for example the eyes, head, upper body, or whatever is specified.
  • JCar - A car using wheel colliders.
  • KeyCombo - A class that can be used to detect fighting-game style combos.
  • LookAtMouse - Cause an object to rotate toward the cursor, along the y axis.
  • Pathfinding - [Old] A pathfinding-system using raycasting to avoid obstacles
  • PhysicsFPSWalker - Another physics based fps walker script.
  • RigidbodyFPSWalker - An physics based FPS walker that works with rigidbodies and thus is affected by forces, joints or other rigidbodies
  • SeekSteer - A class that can be used to move an object to follow a loose path of waypoints
  • ShipControls - Place this script on a RigidBody for 2D spaceship controls like OverWhelmed Arena.
  • SimpleTankController - A script that emulates simple tank movement.
  • VariableSpeedFPSwalker - An FPS walker script having different speeds for walking forward, strafing, and back-pedalling.
  • WaypointMaster - Implementation of A* algorithm, based on waypoints.

Animation Controllers

  • AniMate - Script to quickly and easily create animations/tweens of almost any value and including eased, rigidbody and rotation animation.
  • iTween - Focusing on the established solutions and frameworks of projects such as TweenLite, Tweener, and other tweening systems, iTween is a battle-tested solution for streamlining production in the Unity3D environment.
  • MoveObject - Basic functions for when you just need to move something from point A to point B, or rotate by a given number of degrees, without anything fancy.
  • Tween - An adaptation of the Tweener class of FLASH for unity.
  • AnimationStepSync - Repositions object after animation ends - useful for positioning via animations.

 

 

Physics / Simulation

Physics Scripts

  • CollisionIgnoreManager - Script to manage ignoring collisions between groups of colliders.
  • ComplicatedRigidbodyControl - Attach a rigidbody to an arbitrary transform, or a method to make rigidbodies never overshoot.
  • DontGoThroughThings - Script that uses raycasting to avoid fast-moving objects going through obstructions.
  • DragObject - Similar to DragRigidbody (drag rigidbodies around with the mouse), but much more stable and with more direct control.

Simulation Scripts

  • Compass - This script simulates a compass with North relative to the Z axis of a reference object
  • GameTime - This script rotates a directional light to match the rotation of the sun based on the system time.
  • GPS Global Positioning System - This script simulates a GPS device providing real world GPS locations based on a reference point
  • Gravity - Simulates body-to-body gravity (i.e. planetary gravity)
  • IMU Inertial Measurement Unit - This script simulates an IMU providing velocities and accelerations of the object it is attached to in the objects local frame.
  • OpenStreetMap for unity iPhone - A simple OpenStreetMap script for unity iPhone  
  • SICK Laser Scanner - This script simulates the SICK LMS type planar laser scanner
  • Simple planetary orbits - Visually define the orbital path of one object around another fixed object, like a planet around the sun
  • sunLight - A script that rotates a directional light based on longitude/latitude.  // 태양광
  • Trajectory Simulation - Demonstrates simulating the trajectory of a launched object  // 탄도 시뮬레이션
  • WheelColliderSource - Source code based off the Unity3D WheelCollider and associated classes.

Unity 2.0 GUI Scripts

  • Blinking Text Entry Cursor - Make your cursor blink on input fields
  • CustomGetMouseButtonDown - custom wrapper functions for Input.GetMouseButton(Down) which can be modified to block clicks when over a window
  • DrawLine - Draws a line in the GUI (makes up for the severe lack of an equivalent function in the GUI class).
  • DropDownList - A hierarchy based drop down list that works like the Hierarchy window in Unity.
  • FileBrowser - Implement a crude file browser.
  • ImprovedFileBrowser - A much better file browser.
  • GUICam - Holds GUIRect a rectanle of camera pixelRect in GUI oriented co-oridinates (0,0) is top left
  • GUIExtensions - A library of GUI extensions to fill in some missing gaps. Notably: TextArea that auto-selects on focus.
  • GUIx - extended GUI functions
  • Marquee - Creates a scrolling label that moves from left to right across the screen.
  • PauseMenu - Standard pause menu used by Fugu Games for web players and widgets
  • PopupList - A button that pops up a selectable list when clicked
  • Position To Rect - Convert a GUITexture position to Rect (GUI coordinates)
  • SelectList - A list of elements of which one can be selected.
  • ImprovedSelectionList - A list of elements that can be selected and optionally double-clicked
  • WithPrefs - Functions that change values and modifies preferences in one simple step
  • PasswordField - Allows the user to type in a field masked by *'s (or any other character) [Unity has this built-in now. Leaving it as an example of more complex widget construction, but shouldn't be preferred for actual usage.]

Heads Up Display Scripts

  • FramesPerSecond - Use this script on a GUIText object to display FPS counter.
  • MessageDisplayer - Use this script on a GUIText object to have a self-disappearing list of status messages.
  • MessageList - Create a list of timed self-fading messages.
  • Radar - Use this script on a GameObject to display a radar.

Editor GUI Scripts

  • EditorGUIExtension - Some extensions to make coding the GUI for utilities/custom inspectors easier.
  • TransformInspector - Reverse engineered version of the Unity 3 Transform component inspector. Makes extending the default inspector much easier.

...

'GameEngine > Unity' 카테고리의 다른 글

Machine Learning Unity ML Agents  (0) 2021.09.02

+ Recent posts