August 2018
Beginner
334 pages
10h 19m
English
We will now implement two classes. The first one stores values in a dictionary for learning purposes and the second one actually holds the Q-learning algorithm. Go through the following steps to create the two classes:
using UnityEngine;
using System.Collections.Generic;
public class QValueStore : MonoBehaviour
{
private Dictionary<GameState, Dictionary<GameAction, float>> store;
}
public QValueStore()
{
store = new Dictionary<GameState, Dictionary<GameAction, float>>();
}
public virtual float ...
Read now
Unlock full access