Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

Question OnActionRecieved() Discrete Actions Always Returns Zero

Discussion in 'ML-Agents' started by Ch1ckenNug, Mar 4, 2023.

  1. Ch1ckenNug

    Ch1ckenNug

    Joined:
    Sep 14, 2021
    Posts:
    8
    I have been struggling with this issue for a while now. My OnActionRecieved() function only returns zeros. The continuous actions work okay, but the discrete actions are where this issue arises. I am using the latest python version(30.0). I am manually stepping the environment and requesting decisions.

    Below is my config file. The only thing I have changed in an attempt to fix this issue is set 'normalize' to true:

    behaviors:
    ShootingMLAgent:
    trainer_type: ppo
    hyperparameters:
    batch_size: 10
    buffer_size: 100
    learning_rate: 0.0003
    beta: 0.0005
    epsilon: 0.2
    lambd: 0.99
    num_epoch: 3
    learning_rate_schedule: linear
    beta_schedule: constant
    epsilon_schedule: linear
    network_settings:
    normalize: true
    hidden_units: 128
    num_layers: 2
    reward_signals:
    extrinsic:
    gamma: 0.99
    strength: 1.0
    max_steps: 500000
    time_horizon: 64
    summary_freq: 10000​
     
  2. Ch1ckenNug

    Ch1ckenNug

    Joined:
    Sep 14, 2021
    Posts:
    8
    Since I haven't received any responses, I will use continuous actions instead and clamp them. Is this an okay thing to do, or will it impact performance?
     
  3. maxkcy

    maxkcy

    Joined:
    Oct 11, 2021
    Posts:
    36
    what's your branch size? should be 2.
     
  4. Ch1ckenNug

    Ch1ckenNug

    Joined:
    Sep 14, 2021
    Posts:
    8
    I'm actually so dumb. Thank you so much!