Search Unity

Resolved actions.DicreteActions[0] only outputing 0 instead of random numbers from 0-#

Discussion in 'ML-Agents' started by Ojzach, Apr 14, 2021.

  1. Ojzach

    Ojzach

    Joined:
    Feb 13, 2018
    Posts:
    2
    Hello, i am watching codemonkeys tutorial video (
    ) on setting up and using ML-Agents and ran into a problem with the DiscreteActions where he has the Agent outputting the Discrete actions and it outputs random numbers but when Itry to do it it just outputs 0.

    Code (CSharp):
    1. public class MoveToBallAgent : Agent
    2. {
    3.     public override void OnActionReceived(ActionBuffers actions)
    4.     {
    5.  
    6.         Debug.Log(actions.DiscreteActions[0]);
    7.  
    8.     }
    9. }



    I also tried using Continuous Actions but it does the same thing
     

    Attached Files:

  2. mamaorha

    mamaorha

    Joined:
    Jun 16, 2015
    Posts:
    44
    MAybe since u have no observations?
     
  3. Ojzach

    Ojzach

    Joined:
    Feb 13, 2018
    Posts:
    2
    It wasn't that. I took the when I get annoyed start over approach and created an entirely new project. It works know so i must have downloaded the wrong version of something.