Examples of SearchStrategy


Examples of jsprit.core.algorithm.SearchStrategy

  }
 
  @Test
  public void whenRandomDices_0point1_returnsStrategy1(){
    SearchStrategyManager managerUnderTest = new SearchStrategyManager();
    SearchStrategy mockedStrategy1 = mock(SearchStrategy.class);
    SearchStrategy mockedStrategy2 = mock(SearchStrategy.class);
    managerUnderTest.addStrategy(mockedStrategy1, 0.2);
    managerUnderTest.addStrategy(mockedStrategy2, 0.8);
   
    Random mockedRandom = mock(Random.class);
    managerUnderTest.setRandom(mockedRandom);
View Full Code Here

Examples of jsprit.core.algorithm.SearchStrategy

  }
 
  @Test
  public void whenRandomDices_0point5_returnsStrategy2(){
    SearchStrategyManager managerUnderTest = new SearchStrategyManager();
    SearchStrategy mockedStrategy1 = mock(SearchStrategy.class);
    SearchStrategy mockedStrategy2 = mock(SearchStrategy.class);
    managerUnderTest.addStrategy(mockedStrategy1, 0.2);
    managerUnderTest.addStrategy(mockedStrategy2, 0.8);
   
    Random mockedRandom = mock(Random.class);
    managerUnderTest.setRandom(mockedRandom);
View Full Code Here

Examples of jsprit.core.algorithm.SearchStrategy

  }
 
  @Test
  public void whenRandomDices_0point0_returnsStrategy1(){
    SearchStrategyManager managerUnderTest = new SearchStrategyManager();
    SearchStrategy mockedStrategy1 = mock(SearchStrategy.class);
    SearchStrategy mockedStrategy2 = mock(SearchStrategy.class);
    managerUnderTest.addStrategy(mockedStrategy1, 0.2);
    managerUnderTest.addStrategy(mockedStrategy2, 0.8);
   
    Random mockedRandom = mock(Random.class);
    managerUnderTest.setRandom(mockedRandom);
View Full Code Here

Examples of jsprit.core.algorithm.SearchStrategy

  }
 
  @Test(expected=IllegalStateException.class)
  public void whenRandomIsNull_throwException(){
    SearchStrategyManager managerUnderTest = new SearchStrategyManager();
    SearchStrategy mockedStrategy1 = mock(SearchStrategy.class);
    SearchStrategy mockedStrategy2 = mock(SearchStrategy.class);
    managerUnderTest.addStrategy(mockedStrategy1, 0.2);
    managerUnderTest.addStrategy(mockedStrategy2, 0.8);
   
    Random mockedRandom = null;
    managerUnderTest.setRandom(mockedRandom);
View Full Code Here

Examples of pdp.scrabble.game.SearchStrategy

    for (int i = 0; i < number; i++) {
      SearchLevel level = SearchLevel.valueOf(
          ((String) levels.get(i).getSelectedItem()).toUpperCase());

      SearchStrategy strategy = SearchStrategy.valueOf(
          ((String) strategies.get(i).getSelectedItem()).toUpperCase());

      SearchPriority priority = SearchPriority.HIGHER_SCORE;

      AIConfig config = new AIConfigImpl(level, strategy, priority);
View Full Code Here

Examples of pdp.scrabble.game.SearchStrategy

    this.game.create();

    for (int i = 0; i < 2; i++) {
      SearchLevel lvl = (SearchLevel) priorities[i].getSelectedItem();
      SearchStrategy strategy = SearchStrategy.AUTOMATIC;
      SearchPriority priority = SearchPriority.HIGHER_SCORE;
      AIConfig cfg = new AIConfigImpl(lvl, strategy, priority);

      StringBuilder name = new StringBuilder("AI ");
      name = name.append(i).append(" (").append(lvl).append(")");
View Full Code Here

Examples of pdp.scrabble.game.SearchStrategy

        if (value == null) {
          return;
        }

        SearchStrategy strategy = SearchStrategy.valueOf(
            value.toUpperCase());

        SearchPriority priority = SearchPriority.HIGHER_SCORE;

        AIConfig config = new AIConfigImpl(level, strategy, priority);
View Full Code Here

Examples of voldemort.store.readonly.SearchStrategy

        final String inputFile = (String) options.valueOf("request-file");
        final String searcherClass = CmdUtils.valueOf(options,
                                                      "search-strategy",
                                                      BinarySearchStrategy.class.getName()).trim();
        final boolean gzipIntermediate = options.has("gzip");
        final SearchStrategy searcher = (SearchStrategy) ReflectUtils.callConstructor(ReflectUtils.loadClass(searcherClass));
        final File workingDir = new File(CmdUtils.valueOf(options,
                                                          "working-dir",
                                                          System.getProperty("java.io.tmpdir")));
        String storeDir = (String) options.valueOf("store-dir");
        ReadOnlyStorageFormat format = ReadOnlyStorageFormat.fromCode(CmdUtils.valueOf(options,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.