Skip to content

Commit 5ab907c

Browse files
author
Ervin T
authored
[bugfix] Make FoodCollector heuristic playable (#4147)
* Make FoodCollector heuristic playable * Update changelog
1 parent 57c822d commit 5ab907c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Project/Assets/ML-Agents/Examples/FoodCollector/Scripts/FoodCollectorAgent.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ public override void OnActionReceived(float[] vectorAction)
209209

210210
public override void Heuristic(float[] actionsOut)
211211
{
212+
actionsOut[0] = 0f;
213+
actionsOut[1] = 0f;
214+
actionsOut[2] = 0f;
212215
if (Input.GetKey(KeyCode.D))
213216
{
214217
actionsOut[2] = 2f;

com.unity.ml-agents/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ and this project adheres to
2121
- The Barracuda dependency was upgraded to 1.0.0 (#4118)
2222
#### ml-agents / ml-agents-envs / gym-unity (Python)
2323
- Added new Google Colab notebooks to show how to use `UnityEnvironment'. (#4117)
24+
- Fixed issue with FoodCollector when playing with keyboard. (#4147)
2425

2526
### Bug Fixes
2627
#### com.unity.ml-agents (C#)

0 commit comments

Comments
 (0)