コード例 #1
0
  public AbstractIntelligentAgent(StrategyManager strategyManager, ChoiceMemory choiceMemory) {
    super();

    int strategyKeyLength = strategyManager.getStrategyKeyLength();
    int memoryCapacity = choiceMemory.getCapacity();

    if (strategyKeyLength != memoryCapacity) {
      throw new IllegalArgumentException(
          "The Strategy key length for the supplied StrategyManager "
              + "does not match the capacity of the supplied ChoiceMemory.");
    }

    this.strategyManager = strategyManager;
    this.memory = choiceMemory;
  }
コード例 #2
0
 public List<Strategy> getStrategies() {
   return strategyManager.getStrategies();
 }