/// <summary> /// /// </summary> /// <param name="position"></param> /// <returns></returns> public int Select(TileModel model, int position) { var d = model.GetDomain(position); _selector.SetWeights(GetModifiedWeights(d)); // update the weights in the selector var nextTile = _selector.Next(); _counter.Count(nextTile, position); Debug.Log("next tile is " + _selector.Next().ToString()); if (nextTile == null) { Debug.Log("Next tile doesn't exist"); return(0); } if (nextTile >= _tileSet.Count) { Debug.Log("Next tile out of range"); return(0); } return(nextTile); }
/// <summary> /// /// </summary> /// <param name="position"></param> /// <returns></returns> public int Select(TileModel model, int position) { var d = model.GetDomain(position); _selector.SetWeights(GetModifiedWeights(d)); // update the weights in the selector return(_selector.Next()); }
/// <summary> /// /// </summary> /// <param name="position"></param> /// <returns></returns> public int Select(TileModel model, int position) { _selector.SetWeights(_agent.GetWeights(position)); var d = model.GetDomain(position); return(d.ElementAt(_selector.Next())); }
/// <summary> /// /// </summary> /// <param name="position"></param> /// <returns></returns> public int Select(TileModel model, int position) { var d = model.GetDomain(position); _selector.SetWeights(GetModifiedWeights(d)); // update the weights in the selector var next = _selector.Next(); //Debug.Log("next tile is " + _selector.Next().ToString()); //if (next == null) //{ // Debug.Log("Next tile doesn't exist"); // return 0; //} //if (next >= _tileSet.Count) //{ // Debug.Log("Next tile out of range"); // return 0; //} return(next); }