// mask some moves as not possible public override void CollectDiscreteActionMasks(DiscreteActionMasker actionMasker) { List <bool> possibleMoves = wolfSquareController.PossibleWolfMovesDir(); List <int> notAllowed = new List <int>() { }; for (int i = 0; i < possibleMoves.Count; i++) { if (!possibleMoves[i]) { notAllowed.Add(i); // add the movement number that is not allowed } } actionMasker.SetMask(0, notAllowed); }