Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by unity_q6_4blhkrtIiBA · Mar 27, 2019 at 04:36 PM · aiperformanceartificial intelligencespeed up

Fast Game Simulation for Reinforcement Learning

Hi,

First of all let me explain that I am aware that Unity offers some libraries related with RL, but they are oriented to agents, while the approach that I am looking for is completely different.

I am developing a strategic AI for a RTS. This strategic AI considers a bunch of parameters to weight its goals and send orders to the units. I would like to optimize this weighting by using Neural Networks with Reinforcement Learning. However, to achieve this I need to make thousands of simulations of the game and Unity is not designing thinking in something like that.

However, I wonder how can I speed up the game to work much faster without breaking it. I have though about increasing a lot the TimeScale but it has some incoveniences. Because it makes actions go faster, it results in less FPS per action, with can be a huge loss in precision. If for example a unit is moving towards a position it is not the same to do it in 500 frames than in 5, because in the middle of the path there might be some considerations.

To speedup I can only think about to prescind of everything related to rendering, but it is not enough.

Has anyone tried to do anything like this with Unity?

This is the approach that algorithms like AlphaGo follow, but as you know simulating Go is way easier. Yes, there is this thing of AlphaStar, so I wonder how many programmers where creating the simulation world.

Thanks!

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image toddisarockstar · Apr 03, 2019 at 05:12 AM 0
Share

as you mentioned, visual rendering is typically by far the highest drain on a machines proccesing power. by simply turning the renderes OFF on all the game objects in your scene you could come up with much more preficiency. your coding is another thing, i dont know how complex your game is or what proficiency shortcuts you could take for training. hopefully you have considered running multiple game copies running on a CPU with lots of cores since the video card ability wouldnt matter without renering.

also if you have a user base consider getting background input from them from a server.

keep us informed on your findings. i assume this is a new topic that probobly doesnt have many googleable answers yet. good luck to you

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by camander321 · Apr 02, 2019 at 08:22 PM

I believe there is also potential to set the project up as a server side application in order to ignore the visuals

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ivan866 · Jun 05, 2019 at 10:31 AM 0
Share

Yes, you need to build your project with Server Build option. Completely turns off all rendering overhead.

avatar image
0

Answer by silverlock-tho121 · Apr 02, 2019 at 03:44 AM

A couple options come to mind. You could have multiple simulations and train the network in parallel. You could also move the frame specific logic into FixedUpdate and crank the timescale.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

185 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Keeping track of lots of entities 2 Answers

A* Pathfinding, multiple enemies, moving target. Efficiency advice 3 Answers

how do I add abilities(Scripts/GameObjects) to my path finding agent 1 Answer

RAIN{indie} communication between NPC and external scripts 0 Answers

Check lenght from player? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges