public HistoryMap(int size, int[] shipLengths, CellStateMap cellStateMap) : base(size, shipLengths, cellStateMap) { this.variations = new double[size][]; for (int i = 0; i < this.variations.Length; i++) { this.variations[i] = new double[size]; }; }
public HistoryMap(int size, int[] shipLengths, CellStateMap cellStateMap) : base(size, shipLengths, cellStateMap) { this.variations = new double[size][]; for (int i = 0; i < this.variations.Length; i++) { this.variations[i] = new double[size]; } ; }
protected int weighted; //Multiplies the impact of adding this map to other maps #endregion Fields #region Constructors public ProbabilityMap(int size, int[] shipLengths, CellStateMap cellStateMap) { this.size = size; this.shipLengths = shipLengths; this.cellStateMap = cellStateMap; this.weighted = 1; this.map = new int[size][]; for (int i = 0; i < map.Length; i++) { map[i] = new int[size]; }; }
public void NewMatch() { this.player = this.controller.Player; this.match = this.player.Match; ShotHelper.MatchX = match.FieldSize.X - 1; ShotHelper.MatchY = match.FieldSize.Y - 1; this.shipLengths = this.match.StartingShips.Select(ship => ship.Length).ToArray(); cellStateMap = new CellStateMap(match.FieldSize.X); historyMap = new HistoryMap(match.FieldSize.X, this.shipLengths, cellStateMap); placementMap = new PlacementMap(match.FieldSize.X, this.shipLengths, cellStateMap); huntingMap = new HuntingMap(match.FieldSize.X, this.shipLengths, cellStateMap); }
protected int weighted; //Multiplies the impact of adding this map to other maps public ProbabilityMap(int size, int[] shipLengths, CellStateMap cellStateMap) { this.size = size; this.shipLengths = shipLengths; this.cellStateMap = cellStateMap; this.weighted = 1; this.map = new int[size][]; for (int i = 0; i < map.Length; i++) { map[i] = new int[size]; } ; }
protected const bool REDUCE_PROBABILITY_ON_SINK = false; // Treats sinks as a miss and reduces hunting probability as such public HuntingMap(int size, int[] shipLengths, CellStateMap cellStateMap) : base(size, shipLengths, cellStateMap) { this.weighted = 50; }
public void NewMatch() { this.player = this.controller.Player; this.match = this.player.Match; ShotHelper.MatchX = match.FieldSize.X - 1; ShotHelper.MatchY = match.FieldSize.Y - 1; this.shipLengths = this.match.StartingShips.Select(ship => ship.Length).ToArray(); cellStateMap = new CellStateMap(match.FieldSize.X); historyMap = new HistoryMap(match.FieldSize.X, this.shipLengths, cellStateMap); placementMap = new PlacementMap(match.FieldSize.X, this.shipLengths, cellStateMap); huntingMap = new HuntingMap(match.FieldSize.X, this.shipLengths, cellStateMap); }
public PlacementMap(int size, int[] shipLengths, CellStateMap cellStateMap) : base(size, shipLengths, cellStateMap) { }
protected const bool RESET_HUNTING_ON_SINK = true; // Wipes hunting mode memory when a ship is sunk, if false, #endregion Fields #region Constructors public HuntingMap(int size, int[] shipLengths, CellStateMap cellStateMap) : base(size, shipLengths, cellStateMap) { this.weighted = 50; }
public PlacementMap(int size, int[] shipLengths, CellStateMap cellStateMap) : base(size, shipLengths, cellStateMap) { }