| 1 | package com.takenoko.bot; | |
| 2 | ||
| 3 | import static com.takenoko.bot.utils.pathfinding.panda.PandaPathfinding.getPandaMovesThatEatBamboo; | |
| 4 | ||
| 5 | import com.takenoko.actions.actors.ForcedMovePandaAction; | |
| 6 | import com.takenoko.actions.actors.MovePandaAction; | |
| 7 | import com.takenoko.bot.unitary.*; | |
| 8 | import com.takenoko.engine.Board; | |
| 9 | import com.takenoko.engine.BotState; | |
| 10 | import com.takenoko.engine.History; | |
| 11 | import com.takenoko.layers.tile.ImprovementType; | |
| 12 | import com.takenoko.vector.PositionVector; | |
| 13 | import java.util.List; | |
| 14 | import java.util.Map; | |
| 15 | ||
| 16 | public class GeneralTacticBot extends PriorityBot { | |
| 17 | public GeneralTacticBot() { | |
| 18 | super(); | |
| 19 | } | |
| 20 | ||
| 21 | @Override | |
| 22 | protected void fillAction(Board board, BotState botState, History history) { | |
| 23 | // We do not care if action is available or not, the unavailable actions will be removed by | |
| 24 | // the super method. | |
| 25 | ||
| 26 |
1
1. fillAction : removed call to com/takenoko/bot/GeneralTacticBot::addWithSquash → TIMED_OUT |
this.addWithSquash( |
| 27 | new IrrigationMaster( | |
| 28 | Map.of( | |
| 29 | "placeIrrigationCoefficient", 9, | |
| 30 | "drawIrrigationCoefficient", 10, | |
| 31 | "storeIrrigationCoefficient", 11, | |
| 32 | "maxIrrigationToChooseToDraw", 4)) | |
| 33 | .compute(board, botState, history), | |
| 34 | 20, | |
| 35 | 25); | |
| 36 |
1
1. fillAction : removed call to com/takenoko/bot/GeneralTacticBot::addWithSquash → TIMED_OUT |
this.addWithSquash(new SmartObjective().compute(board, botState, history), 10, 15); |
| 37 | ||
| 38 |
1
1. fillAction : removed call to com/takenoko/bot/GeneralTacticBot::addWithSquash → TIMED_OUT |
this.addWithSquash(new WeatherMaster().compute(board, botState, history), 5, 10); |
| 39 | ||
| 40 |
1
1. fillAction : removed call to com/takenoko/bot/GeneralTacticBot::addWithSquash → TIMED_OUT |
this.addWithSquash(new SmartPattern().compute(board, botState, history), 18, 25); |
| 41 | ||
| 42 |
1
1. fillAction : removed call to com/takenoko/bot/GeneralTacticBot::addWithSquash → TIMED_OUT |
this.addWithSquash(new SmartPanda().compute(board, botState, history), 0, 2); |
| 43 |
1
1. fillAction : removed call to com/takenoko/bot/GeneralTacticBot::addWithSquash → TIMED_OUT |
this.addWithSquash(new SmartGardener().compute(board, botState, history), 0, 2); |
| 44 | ||
| 45 |
1
1. fillAction : removed call to com/takenoko/bot/GeneralTacticBot::addWithSquash → TIMED_OUT |
this.addWithSquash( |
| 46 | new SmartDrawImprovement( | |
| 47 | Map.of( | |
| 48 | ImprovementType.WATERSHED, 3, | |
| 49 | ImprovementType.ENCLOSURE, 2)) | |
| 50 | .compute(board, botState, history), | |
| 51 | 0, | |
| 52 | 10); | |
| 53 | ||
| 54 | List<PositionVector> pandaMoveThatEatBamboo = getPandaMovesThatEatBamboo(board); | |
| 55 | ||
| 56 |
1
1. fillAction : negated conditional → KILLED |
if (!pandaMoveThatEatBamboo.isEmpty()) { |
| 57 |
1
1. fillAction : removed call to com/takenoko/bot/GeneralTacticBot::addActionWithPriority → TIMED_OUT |
this.addActionWithPriority(new MovePandaAction(pandaMoveThatEatBamboo.get(0)), -100); |
| 58 |
1
1. fillAction : removed call to com/takenoko/bot/GeneralTacticBot::addActionWithPriority → TIMED_OUT |
this.addActionWithPriority( |
| 59 | new ForcedMovePandaAction(pandaMoveThatEatBamboo.get(0)), -100); | |
| 60 | } | |
| 61 | } | |
| 62 | } | |
Mutations | ||
| 26 |
1.1 |
|
| 36 |
1.1 |
|
| 38 |
1.1 |
|
| 40 |
1.1 |
|
| 42 |
1.1 |
|
| 43 |
1.1 |
|
| 45 |
1.1 |
|
| 56 |
1.1 |
|
| 57 |
1.1 |
|
| 58 |
1.1 |