repo stringlengths 1 191 ⌀ | file stringlengths 23 351 | code stringlengths 0 5.32M | file_length int64 0 5.32M | avg_line_length float64 0 2.9k | max_line_length int64 0 288k | extension_type stringclasses 1
value |
|---|---|---|---|---|---|---|
MicroRTS | MicroRTS-master/src/ai/evaluation/SimpleSqrtEvaluationFunction.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.evaluation;
import rts.GameState;
import rts.PhysicalGameState;
import rts.units.*;
/**
*
* @author santi
*/
public class SimpleSqrtEvaluationFunction extends EvaluationFunction {
public static fl... | 2,146 | 35.389831 | 115 | java |
MicroRTS | MicroRTS-master/src/ai/evaluation/SimpleSqrtEvaluationFunction2.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.evaluation;
import rts.GameState;
import rts.PhysicalGameState;
import rts.units.*;
/**
*
* @author santi
*
* This function is similar to SimpleSqrtEvaluationFunction, except that it detects when a play... | 2,285 | 34.71875 | 142 | java |
MicroRTS | MicroRTS-master/src/ai/evaluation/SimpleSqrtEvaluationFunction3.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.evaluation;
import rts.GameState;
import rts.PhysicalGameState;
import rts.units.*;
/**
*
* @author santi
*
* This function uses the same base evaluation as SimpleSqrtEvaluationFunction and SimpleSqrtEv... | 1,665 | 32.32 | 206 | java |
MicroRTS | MicroRTS-master/src/ai/jni/JNIAI.java | package ai.jni;
import java.util.List;
import ai.core.AI;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import ai.evaluation.SimpleEvaluationFunction;
import rts.GameState;
import rts.PlayerAction;
import rts.units.UnitTypeTable;
/**
* This AI does not actually have the ability to m... | 2,657 | 28.865169 | 98 | java |
MicroRTS | MicroRTS-master/src/ai/jni/JNIInterface.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.jni;
import rts.GameState;
import rts.PlayerAction;
/**
*
* @author costa
*/
public interface JNIInterface {
public Pl... | 659 | 30.428571 | 90 | java |
MicroRTS | MicroRTS-master/src/ai/jni/Response.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.jni;
/**
*
* @author costa
*/
public class Response {
public int[][][] observation;
public double[] reward;
... | 808 | 25.096774 | 90 | java |
MicroRTS | MicroRTS-master/src/ai/jni/Responses.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.jni;
/**
*
* @author costa
*/
public class Responses {
public int[][][][] observation;
public double[][] reward;... | 811 | 25.193548 | 84 | java |
MicroRTS | MicroRTS-master/src/ai/machinelearning/bayes/ActionInterdependenceModel.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.machinelearning.bayes;
import ai.machinelearning.bayes.featuregeneration.FeatureGenerator;
import ai.machinelearning.bayes.... | 22,275 | 41.592734 | 166 | java |
MicroRTS | MicroRTS-master/src/ai/machinelearning/bayes/BayesianModel.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.machinelearning.bayes;
import ai.machinelearning.bayes.featuregeneration.FeatureGenerator;
import java.util.ArrayList;
impo... | 6,240 | 33.103825 | 140 | java |
MicroRTS | MicroRTS-master/src/ai/machinelearning/bayes/BayesianModelByUnitTypeWithDefaultModel.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.machinelearning.bayes;
import ai.machinelearning.bayes.TrainingInstance;
import java.util.ArrayList;
import java.util.HashM... | 8,462 | 38 | 144 | java |
MicroRTS | MicroRTS-master/src/ai/machinelearning/bayes/CalibratedNaiveBayes.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.machinelearning.bayes;
import ai.machinelearning.bayes.featuregeneration.FeatureGenerator;
import ai.machinelearning.bayes.... | 14,468 | 40.458453 | 160 | java |
MicroRTS | MicroRTS-master/src/ai/machinelearning/bayes/DiscreteCPD.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.machinelearning.bayes;
import org.jdom.Element;
import util.XMLWriter;
/**
*
* @author santi
*
* captures the probabi... | 3,815 | 28.8125 | 117 | java |
MicroRTS | MicroRTS-master/src/ai/machinelearning/bayes/FeatureSelection.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.machinelearning.bayes;
import ai.machinelearning.bayes.TrainingInstance;
import java.util.ArrayList;
import java.util.Arra... | 15,834 | 47.723077 | 221 | java |
MicroRTS | MicroRTS-master/src/ai/machinelearning/bayes/TrainingInstance.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.machinelearning.bayes;
import java.util.ArrayList;
import java.util.List;
import rts.GameState;
import rts.UnitAction;
impo... | 1,453 | 30.608696 | 129 | java |
MicroRTS | MicroRTS-master/src/ai/machinelearning/bayes/featuregeneration/FeatureGenerator.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.machinelearning.bayes.featuregeneration;
import ai.machinelearning.bayes.TrainingInstance;
import java.io.File;
import java... | 4,509 | 32.161765 | 135 | java |
MicroRTS | MicroRTS-master/src/ai/machinelearning/bayes/featuregeneration/FeatureGeneratorComplex.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.machinelearning.bayes.featuregeneration;
import ai.machinelearning.bayes.TrainingInstance;
import java.util.ArrayList;
impo... | 6,437 | 41.635762 | 142 | java |
MicroRTS | MicroRTS-master/src/ai/machinelearning/bayes/featuregeneration/FeatureGeneratorEmpty.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.machinelearning.bayes.featuregeneration;
import ai.machinelearning.bayes.TrainingInstance;
import java.util.ArrayList;
impo... | 549 | 24 | 79 | java |
MicroRTS | MicroRTS-master/src/ai/machinelearning/bayes/featuregeneration/FeatureGeneratorSimple.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.machinelearning.bayes.featuregeneration;
import ai.machinelearning.bayes.TrainingInstance;
import java.util.ArrayList;
impo... | 4,402 | 35.38843 | 136 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/MCTSNode.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts;
import ai.evaluation.EvaluationFunction;
import java.util.List;
import java.util.Random;
import rts.GameState;
import rts.PlayerAction;
/**
*
* @author santi
*/
public abstract class MCTSNode {
... | 2,486 | 40.45 | 218 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/believestatemcts/AIWithBelieveState.java | package ai.mcts.believestatemcts;
import java.util.List;
import rts.GameState;
import rts.PartiallyObservableGameState;
import rts.units.Unit;
/**
*
* @author albertouri
*/
public interface AIWithBelieveState {
void setInitialBelieveState(int player, GameState gs, PartiallyObservableGameState pogs);
List... | 3,485 | 40.5 | 121 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/believestatemcts/BS1_NaiveMCTS.java | package ai.mcts.believestatemcts;
import ai.core.AI;
import ai.evaluation.EvaluationFunction;
import static ai.mcts.MCTSNode.r;
import ai.mcts.naivemcts.NaiveMCTS;
import ai.mcts.naivemcts.NaiveMCTSNode;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import rts.GameState;
import rts.Pa... | 6,502 | 35.948864 | 225 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/believestatemcts/BS2_NaiveMCTS.java | package ai.mcts.believestatemcts;
import ai.core.AI;
import ai.evaluation.EvaluationFunction;
import ai.mcts.naivemcts.NaiveMCTS;
import ai.mcts.naivemcts.NaiveMCTSNode;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import rts.GameState;
import rts.PartiallyObservableGameState;
import... | 9,114 | 39.511111 | 225 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/believestatemcts/BS3_NaiveMCTS.java | package ai.mcts.believestatemcts;
import ai.core.AI;
import ai.evaluation.EvaluationFunction;
import static ai.mcts.MCTSNode.r;
import ai.mcts.naivemcts.NaiveMCTS;
import ai.mcts.naivemcts.NaiveMCTSNode;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import rts.GameState;
import rts.Pa... | 18,452 | 42.215457 | 225 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/informedmcts/InformedNaiveMCTS.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.informedmcts;
import ai.*;
import ai.core.AI;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;
import ai.evaluation.SimpleSqrtEvalua... | 20,224 | 36.874532 | 313 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/informedmcts/InformedNaiveMCTSNode.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.informedmcts;
import ai.mcts.MCTSNode;
import ai.stochastic.UnitActionProbabilityDistribution;
import java.math.BigInteger;
import java.util.*;
import rts.*;
import rts.units.Unit;
import util.Pair;
impo... | 15,653 | 42.483333 | 217 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/informedmcts/InformedUnitActionTableEntry.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.informedmcts;
import java.util.List;
import rts.UnitAction;
import rts.units.Unit;
/**
*
* @author santi
*/
public class InformedUnitActionTableEntry {
public Unit u;
public int nactions = 0;... | 964 | 23.74359 | 96 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/mlps/MLPSMCTS.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.mlps;
import ai.*;
import ai.core.AI;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;
import ai.evaluation.SimpleSqrtEvaluationFunc... | 10,662 | 30.92515 | 195 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/mlps/MLPSNode.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.mlps;
import ai.mcts.MCTSNode;
import ai.montecarlo.lsi.Sampling.UnitActionTableEntry;
import java.util.*;
import rts.*;
import rts.units.Unit;
import util.Pair;
/**
*
* @author santi
*
* From: "Le... | 13,890 | 41.873457 | 177 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/naivemcts/NaiveMCTS.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.naivemcts;
import ai.*;
import ai.core.AI;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;
import ai.evaluation.SimpleSqrtEvaluatio... | 15,702 | 32.625268 | 296 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/naivemcts/NaiveMCTSNode.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.naivemcts;
import ai.mcts.MCTSNode;
import java.math.BigInteger;
import java.util.*;
import rts.*;
import rts.units.Unit;
import util.Pair;
import util.Sampler;
/**
*
* @author santi
*/
public class ... | 15,747 | 40.994667 | 207 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/naivemcts/TwoPhaseNaiveMCTS.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.naivemcts;
import ai.*;
import ai.core.AI;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;
import ai.evaluation.SimpleSqrtEvaluatio... | 16,930 | 33.765914 | 204 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/naivemcts/TwoPhaseNaiveMCTSNode.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.naivemcts;
import static ai.mcts.MCTSNode.r;
import static ai.mcts.naivemcts.NaiveMCTSNode.DEBUG;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Li... | 8,751 | 46.308108 | 182 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/naivemcts/TwoPhaseNaiveMCTSPerNode.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.naivemcts;
import ai.*;
import ai.core.AI;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;
import ai.evaluation.SimpleSqrtEvaluatio... | 15,844 | 32.856838 | 204 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/naivemcts/UnitActionTableEntry.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.naivemcts;
import java.util.List;
import rts.UnitAction;
import rts.units.Unit;
/**
*
* @author santi
*/
public class UnitActionTableEntry {
public Unit u;
public int nactions = 0;
public... | 417 | 18 | 52 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/uct/DownsamplingUCT.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.uct;
import ai.core.AI;
import ai.RandomBiasedAI;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;
import ai.evaluation.SimpleSqrtEv... | 8,330 | 30.79771 | 263 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/uct/DownsamplingUCTNode.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.uct;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import rts.GameState;
import rts.PlayerAction;
import rts.PlayerActionGenerator;
/**
*
* @author santi
*/
public clas... | 5,682 | 39.304965 | 174 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/uct/UCT.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.uct;
import ai.core.AI;
import ai.RandomBiasedAI;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;
import ai.evaluation.SimpleSqrtEv... | 9,579 | 31.147651 | 263 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/uct/UCTFirstPlayUrgency.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.uct;
import ai.core.AI;
import ai.RandomBiasedAI;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;
import ai.evaluation.SimpleSqrtEv... | 10,146 | 31.41853 | 263 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/uct/UCTNode.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.uct;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import rts.GameState;
import rts.PlayerAction;
import rts.PlayerActionGenerator;
/**
*
* @author santi
*/
public class... | 5,148 | 35.51773 | 172 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/uct/UCTNodeFirstPlayUrgency.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.uct;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Random;
import rts.GameState;
import rts.PlayerAction;
import rts.Player... | 6,145 | 38.909091 | 172 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/uct/UCTUnitActions.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.uct;
import ai.core.AI;
import ai.RandomBiasedAI;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;
import ai.evaluation.SimpleSqrtEv... | 8,322 | 30.888889 | 176 | java |
MicroRTS | MicroRTS-master/src/ai/mcts/uct/UCTUnitActionsNode.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.mcts.uct;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import rts.*;
import rts.units.Unit;
/**
*
* @author santi
*/
public class UCTUnitActionsNode {
static Random r = ... | 5,488 | 39.065693 | 170 | java |
MicroRTS | MicroRTS-master/src/ai/minimax/MiniMaxResult.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.minimax;
import rts.GameState;
import rts.PlayerAction;
/**
*
* @author santi
*/
public class MiniMaxResult {
public PlayerAction action;
public float evaluation;
public GameState gs;
... | 542 | 17.724138 | 67 | java |
MicroRTS | MicroRTS-master/src/ai/minimax/ABCD/ABCD.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.minimax.ABCD;
import ai.abstraction.WorkerRush;
import ai.abstraction.pathfinding.AStarPathFinding;
import ai.core.AI;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;
import ai... | 8,694 | 32.964844 | 166 | java |
MicroRTS | MicroRTS-master/src/ai/minimax/ABCD/ABCDNode.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.minimax.ABCD;
import rts.GameState;
import rts.PlayerAction;
import rts.PlayerActionGenerator;
import util.Pair;
/**
*
* @author santi
*/
public class ABCDNode {
public int type; // -1: unknown, 0 ... | 839 | 23.705882 | 101 | java |
MicroRTS | MicroRTS-master/src/ai/minimax/ABCD/IDABCD.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.minimax.ABCD;
import ai.abstraction.WorkerRush;
import ai.abstraction.pathfinding.AStarPathFinding;
import ai.core.AI;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import ai.... | 24,719 | 41.694301 | 234 | java |
MicroRTS | MicroRTS-master/src/ai/minimax/RTMiniMax/IDRTMinimax.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.minimax.RTMiniMax;
import ai.evaluation.EvaluationFunctionForwarding;
import ai.core.AI;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;... | 15,203 | 41.588235 | 250 | java |
MicroRTS | MicroRTS-master/src/ai/minimax/RTMiniMax/IDRTMinimaxRandomized.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.minimax.RTMiniMax;
import ai.core.AI;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;
import ai.evaluation.SimpleSqrtEvaluationFunction3;
import java.util.LinkedList;
import ja... | 14,500 | 46.544262 | 198 | java |
MicroRTS | MicroRTS-master/src/ai/minimax/RTMiniMax/RTMiniMaxNode.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.minimax.RTMiniMax;
import rts.GameState;
import rts.PlayerAction;
import rts.PlayerActionGenerator;
import util.Pair;
/**
*
* @author santi
*/
public class RTMiniMaxNode {
public int type; // -1: u... | 686 | 21.9 | 83 | java |
MicroRTS | MicroRTS-master/src/ai/minimax/RTMiniMax/RTMiniMaxRandomizedRootNode.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.minimax.RTMiniMax;
import ai.evaluation.EvaluationFunction;
import rts.GameState;
/**
*
* @author santi
*/
public class RTMiniMaxRandomizedRootNode extends RTMiniMaxNode {
public int iterations_run =... | 495 | 20.565217 | 80 | java |
MicroRTS | MicroRTS-master/src/ai/minimax/RTMiniMax/RTMinimax.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.minimax.RTMiniMax;
import ai.core.AI;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;
import ai.evaluation.SimpleSqrtEvaluationFunction3;
import ai.minimax.MiniMaxResult;
impor... | 7,563 | 33.226244 | 139 | java |
MicroRTS | MicroRTS-master/src/ai/montecarlo/MonteCarlo.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.montecarlo;
import ai.core.AI;
import ai.RandomBiasedAI;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;
import ai.evaluation.SimpleSqrt... | 10,143 | 33.040268 | 286 | java |
MicroRTS | MicroRTS-master/src/ai/montecarlo/lsi/LSI.java | /*
* This class was contributed by: Antonin Komenda, Alexander Shleyfman and Carmel Domshlak
*/
package ai.montecarlo.lsi;
import ai.RandomBiasedAI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
impor... | 51,591 | 39.369327 | 164 | java |
MicroRTS | MicroRTS-master/src/ai/montecarlo/lsi/Sampling.java | /*
* This class was contributed by: Antonin Komenda, Alexander Shleyfman and Carmel Domshlak
*/
package ai.montecarlo.lsi;
import util.CartesianProduct;
import ai.core.AI;
import ai.evaluation.EvaluationFunction;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.H... | 15,894 | 35.709007 | 152 | java |
MicroRTS | MicroRTS-master/src/ai/portfolio/PortfolioAI.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.portfolio;
import ai.RandomBiasedAI;
import ai.abstraction.LightRush;
import ai.abstraction.RangedRush;
import ai.abstract... | 7,857 | 31.605809 | 136 | java |
MicroRTS | MicroRTS-master/src/ai/portfolio/portfoliogreedysearch/PGSAI.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.portfolio.portfoliogreedysearch;
import ai.abstraction.pathfinding.AStarPathFinding;
import ai.core.AI;
import ai.abstract... | 12,168 | 33.968391 | 168 | java |
MicroRTS | MicroRTS-master/src/ai/portfolio/portfoliogreedysearch/UnitScript.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.portfolio.portfoliogreedysearch;
import rts.GameState;
import rts.UnitAction;
import rts.units.Unit;
/**
*
* @author san... | 494 | 23.75 | 79 | java |
MicroRTS | MicroRTS-master/src/ai/portfolio/portfoliogreedysearch/UnitScriptAttack.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.portfolio.portfoliogreedysearch;
import ai.abstraction.AbstractAction;
import ai.abstraction.Attack;
import ai.abstraction.... | 1,748 | 26.328125 | 88 | java |
MicroRTS | MicroRTS-master/src/ai/portfolio/portfoliogreedysearch/UnitScriptBuild.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.portfolio.portfoliogreedysearch;
import ai.abstraction.AbstractAction;
import ai.abstraction.Build;
import ai.abstraction.p... | 2,192 | 27.115385 | 91 | java |
MicroRTS | MicroRTS-master/src/ai/portfolio/portfoliogreedysearch/UnitScriptHarvest.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.portfolio.portfoliogreedysearch;
import ai.abstraction.AbstractAction;
import ai.abstraction.Harvest;
import ai.abstraction... | 2,127 | 29.4 | 92 | java |
MicroRTS | MicroRTS-master/src/ai/portfolio/portfoliogreedysearch/UnitScriptIdle.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.portfolio.portfoliogreedysearch;
import ai.abstraction.AbstractAction;
import ai.abstraction.Idle;
import rts.GameState;
im... | 898 | 22.051282 | 79 | java |
MicroRTS | MicroRTS-master/src/ai/portfolio/portfoliogreedysearch/UnitScriptTrain.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.portfolio.portfoliogreedysearch;
import ai.abstraction.AbstractAction;
import ai.abstraction.Train;
import rts.GameState;
i... | 982 | 22.404762 | 79 | java |
MicroRTS | MicroRTS-master/src/ai/portfolio/portfoliogreedysearch/UnitScriptsAI.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.portfolio.portfoliogreedysearch;
import ai.core.AI;
import ai.core.ParameterSpecification;
import java.util.ArrayList;
impo... | 3,617 | 31.017699 | 104 | java |
MicroRTS | MicroRTS-master/src/ai/puppet/BasicConfigurableScript.java | package ai.puppet;
import ai.abstraction.pathfinding.FloodFillPathFinding;
import java.util.ArrayList;
import java.util.Collection;
import java.util.EnumMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
import java.util.function.Predicate;
import ai.abstraction.pathfinding.PathFinding... | 18,840 | 35.09387 | 133 | java |
MicroRTS | MicroRTS-master/src/ai/puppet/CacheTable.java | package ai.puppet;
import java.util.Random;
import rts.GameState;
import util.Pair;
class PuppetGameState{
GameState gs;
int hash;
static final int MAX_DEPTH=100;
static final int MAX_CHOICE_POINTS=10;
static final int MAX_CHOICES=10;
static int zobrist[][][][]=new int[MAX_DEPTH][2][MAX_CHOICE_POINTS][MAX_CHO... | 2,258 | 20.932039 | 106 | java |
MicroRTS | MicroRTS-master/src/ai/puppet/ConfigurableScript.java | package ai.puppet;
import java.util.ArrayList;
import java.util.Collection;
import java.util.EnumMap;
import ai.abstraction.AbstractionLayerAI;
import ai.abstraction.pathfinding.PathFinding;
import rts.GameState;
import util.Pair;
public abstract class ConfigurableScript<T extends Enum<T>> extends AbstractionLayerAI... | 2,592 | 23.462264 | 100 | java |
MicroRTS | MicroRTS-master/src/ai/puppet/PuppetBase.java | package ai.puppet;
import java.util.ArrayList;
import java.util.stream.Collectors;
import ai.core.AI;
import ai.core.AIWithComputationBudget;
import ai.evaluation.EvaluationFunction;
import rts.GameState;
import rts.PlayerAction;
import util.Pair;
class MoveGenerator{
ArrayList<ArrayList<Pair<Integer,Integer>>> choi... | 3,822 | 23.986928 | 87 | java |
MicroRTS | MicroRTS-master/src/ai/puppet/PuppetMCTSNode.java | package ai.puppet;
import java.util.ArrayList;
import java.util.List;
import rts.GameState;
public class PuppetMCTSNode {
GameState gs;
float C;//exploration constant
PuppetMCTSNode parent;
ConfigurableScript<?> script;
float evaluation_bound;
List<PuppetMCTSNode> children= new ArrayList<>();
Move prevMove... | 4,208 | 25.639241 | 166 | java |
MicroRTS | MicroRTS-master/src/ai/puppet/PuppetNoPlan.java | package ai.puppet;
import ai.abstraction.pathfinding.FloodFillPathFinding;
import ai.core.AI;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import ai.evaluation.SimpleSqrtEvaluationFunction3;
import java.util.List;
import rts.GameState;
import rts.PlayerAction;
import rts.units.UnitTy... | 2,557 | 23.834951 | 86 | java |
MicroRTS | MicroRTS-master/src/ai/puppet/PuppetSearchAB.java | /**
*
*/
package ai.puppet;
import ai.abstraction.pathfinding.FloodFillPathFinding;
import java.util.Collection;
import java.util.Collections;
import java.util.Stack;
import ai.core.AI;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;
import ai.evaluation.SimpleSqrtEvaluationFunction... | 13,955 | 27.539877 | 154 | java |
MicroRTS | MicroRTS-master/src/ai/puppet/PuppetSearchMCTS.java | package ai.puppet;
import ai.RandomBiasedAI;
import ai.abstraction.pathfinding.FloodFillPathFinding;
import java.util.Collection;
import java.util.Collections;
import ai.core.AI;
import ai.core.ParameterSpecification;
import ai.evaluation.EvaluationFunction;
import ai.evaluation.SimpleSqrtEvaluationFunction3;
import ... | 8,896 | 27.516026 | 144 | java |
MicroRTS | MicroRTS-master/src/ai/puppet/SingleChoiceConfigurableScript.java | package ai.puppet;
import ai.abstraction.pathfinding.FloodFillPathFinding;
import java.util.Collection;
import java.util.EnumMap;
import ai.abstraction.pathfinding.PathFinding;
import ai.core.AI;
import ai.core.ParameterSpecification;
import java.util.ArrayList;
import java.util.List;
import rts.GameState;
import rts... | 2,515 | 26.347826 | 113 | java |
MicroRTS | MicroRTS-master/src/ai/puppet/TranspositionTable.java | package ai.puppet;
class Entry{
Move _bestMove;
int _hash;
float _value;
int _height;
boolean _exact;
boolean _upper;
Entry(Move bestMove,int hash, float value, int height, boolean exact, boolean upper){
_bestMove=bestMove;
_hash=hash;
_value=value;
_height=height;
_exact=exact;
_upper=upper;
}
E... | 2,071 | 19.514851 | 125 | java |
MicroRTS | MicroRTS-master/src/ai/reward/AttackRewardFunction.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.reward;
import rts.GameState;
import rts.TraceEntry;
import rts.UnitAction;
import rts.units.Unit;
import util.Pair;
/**
*
* @author costa
*/
public class AttackRewardFunction extends RewardFunctionInterfa... | 1,027 | 24.073171 | 109 | java |
MicroRTS | MicroRTS-master/src/ai/reward/CloserToEnemyBaseRewardFunction.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.reward;
import rts.GameState;
import rts.TraceEntry;
import rts.units.Unit;
/**
*
* @author costa
*/
public class CloserToEnemyBaseRewardFunction extends RewardFunctionInterface{
public static float A... | 2,422 | 32.652778 | 111 | java |
MicroRTS | MicroRTS-master/src/ai/reward/CloserToEnemyUnitRewardFunction.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.reward;
import rts.GameState;
import rts.TraceEntry;
import rts.units.Unit;
/**
*
* @author costa
*/
public class CloserToEnemyUnitRewardFunction extends RewardFunctionInterface{
public static float A... | 2,422 | 32.652778 | 111 | java |
MicroRTS | MicroRTS-master/src/ai/reward/ProduceBuildingRewardFunction.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.reward;
import rts.GameState;
import rts.TraceEntry;
import rts.UnitAction;
import rts.units.Unit;
import util.Pair;
/**
*
* @author costa
*/
public class ProduceBuildingRewardFunction extends RewardFuncti... | 1,040 | 25.025 | 120 | java |
MicroRTS | MicroRTS-master/src/ai/reward/ProduceCombatUnitRewardFunction.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.reward;
import rts.GameState;
import rts.TraceEntry;
import rts.UnitAction;
import rts.units.Unit;
import util.Pair;
/**
*
* @author costa
*/
public class ProduceCombatUnitRewardFunction extends RewardFunc... | 1,093 | 26.35 | 152 | java |
MicroRTS | MicroRTS-master/src/ai/reward/ProduceWorkerRewardFunction.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.reward;
import rts.GameState;
import rts.TraceEntry;
import rts.UnitAction;
import rts.units.Unit;
import util.Pair;
/**
*
* @author costa
*/
public class ProduceWorkerRewardFunction extends RewardFunction... | 989 | 23.75 | 120 | java |
MicroRTS | MicroRTS-master/src/ai/reward/ResourceGatherRewardFunction.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.reward;
import rts.GameState;
import rts.PhysicalGameState;
import rts.TraceEntry;
import rts.UnitAction;
import rts.units.Unit;
import util.Pair;
/**
*
* @author costa
*/
public class ResourceGatherReward... | 1,467 | 27.230769 | 97 | java |
MicroRTS | MicroRTS-master/src/ai/reward/RewardFunctionInterface.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.reward;
import rts.GameState;
import rts.TraceEntry;
/**
*
* @author costa
*/
public abstract class RewardFunctionInterface {
public double reward = 0.0;
public boolean done = false;
publi... | 618 | 18.967742 | 103 | java |
MicroRTS | MicroRTS-master/src/ai/reward/WinLossRewardFunction.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.reward;
import rts.GameState;
import rts.TraceEntry;
/**
*
* @author costa
*/
public class WinLossRewardFunction extends RewardFunctionInterface{
public void computeReward(int maxplayer, int minplaye... | 544 | 19.961538 | 95 | java |
MicroRTS | MicroRTS-master/src/ai/scv/SCV.java | package ai.scv;
import ai.abstraction.EconomyMilitaryRush;
import ai.abstraction.EconomyRush;
import ai.abstraction.HeavyDefense;
import ai.abstraction.LightDefense;
import ai.abstraction.RangedDefense;
import ai.abstraction.WorkerDefense;
import ai.RandomBiasedAI;
import ai.abstraction.LightRush;
import ai.abstracti... | 20,417 | 33.902564 | 190 | java |
MicroRTS | MicroRTS-master/src/ai/socket/GameVisualSimulationWithSocketAI.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.socket;
import ai.core.AI;
import ai.*;
import gui.PhysicalGameStatePanel;
import javax.swing.JFrame;
import rts.GameState;
import rts.PhysicalGameState;
import rts.PlayerAction;
import rts.units.UnitTypeTab... | 2,265 | 31.84058 | 117 | java |
MicroRTS | MicroRTS-master/src/ai/socket/JSONSocketWrapperAI.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.socket;
import ai.abstraction.WorkerRush;
import ai.core.AIWithComputationBudget;
import java.io.BufferedReader;
import jav... | 7,423 | 41.913295 | 141 | java |
MicroRTS | MicroRTS-master/src/ai/socket/SocketAI.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.socket;
import ai.core.AI;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import java.io.Bu... | 9,903 | 33.269896 | 142 | java |
MicroRTS | MicroRTS-master/src/ai/socket/XMLSocketWrapperAI.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.socket;
import ai.abstraction.WorkerRush;
import ai.core.AIWithComputationBudget;
import java.io.BufferedReader;
import jav... | 7,486 | 42.52907 | 141 | java |
MicroRTS | MicroRTS-master/src/ai/stochastic/UnitActionProbabilityDistribution.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.stochastic;
import java.util.List;
import rts.GameState;
import rts.UnitAction;
import rts.units.Unit;
import rts.units.Uni... | 699 | 24 | 114 | java |
MicroRTS | MicroRTS-master/src/ai/stochastic/UnitActionProbabilityDistributionAI.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ai.stochastic;
import ai.core.AI;
import ai.core.ParameterSpecification;
import java.util.List;
import java.util.Random;
import ai.stochastic.UnitActionProbabilityDistribution;
import java.util.ArrayList;
import... | 4,441 | 29.847222 | 148 | java |
MicroRTS | MicroRTS-master/src/ai/stochastic/UnitActionTypeConstantDistribution.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.stochastic;
import java.util.List;
import rts.GameState;
import rts.UnitAction;
import rts.units.Unit;
import rts.units.Uni... | 1,549 | 28.245283 | 172 | java |
MicroRTS | MicroRTS-master/src/ai/stochastic/UnitActionUniformDistribution.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.stochastic;
import java.util.List;
import rts.GameState;
import rts.UnitAction;
import rts.units.Unit;
import rts.units.Uni... | 867 | 23.8 | 104 | java |
MicroRTS | MicroRTS-master/src/ai/synthesis/dslForScriptGenerator/DslAI.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.synthesis.dslForScriptGenerator;
import ai.synthesis.dslForScriptGenerator.DSLCommandInterfaces.ICommand;
import ai.synthes... | 5,518 | 33.279503 | 129 | java |
MicroRTS | MicroRTS-master/src/ai/synthesis/dslForScriptGenerator/DslAIScript.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.synthesis.dslForScriptGenerator;
import ai.synthesis.dslForScriptGenerator.DSLCommand.DSLBasicAction.AttackBasic;
import ai... | 5,213 | 43.186441 | 113 | java |
MicroRTS | MicroRTS-master/src/ai/synthesis/dslForScriptGenerator/DSLBasicConditional/AbstractConditional.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.synthesis.dslForScriptGenerator.DSLBasicConditional;
import ai.synthesis.grammar.dslTree.interfacesDSL.iDSL;
import java.ma... | 2,748 | 29.544444 | 95 | java |
MicroRTS | MicroRTS-master/src/ai/synthesis/dslForScriptGenerator/DSLBasicConditional/AbstractUnitConditional.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.synthesis.dslForScriptGenerator.DSLBasicConditional;
import java.math.BigDecimal;
import java.util.List;
/**
*
* @author... | 2,215 | 29.356164 | 99 | java |
MicroRTS | MicroRTS-master/src/ai/synthesis/dslForScriptGenerator/DSLBasicConditional/ConditionalBiggerThen.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.synthesis.dslForScriptGenerator.DSLBasicConditional;
import ai.abstraction.pathfinding.PathFinding;
import java.math.BigDec... | 1,968 | 29.765625 | 135 | java |
MicroRTS | MicroRTS-master/src/ai/synthesis/dslForScriptGenerator/DSLBasicConditional/IConditional.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.synthesis.dslForScriptGenerator.DSLBasicConditional;
import java.util.HashMap;
import ai.abstraction.pathfinding.PathFindi... | 704 | 27.2 | 118 | java |
MicroRTS | MicroRTS-master/src/ai/synthesis/dslForScriptGenerator/DSLBasicConditional/IUnitConditional.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.synthesis.dslForScriptGenerator.DSLBasicConditional;
import java.util.HashMap;
import ai.abstraction.pathfinding.PathFindi... | 772 | 28.730769 | 126 | java |
MicroRTS | MicroRTS-master/src/ai/synthesis/dslForScriptGenerator/DSLBasicConditional/SimpleConditional.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.synthesis.dslForScriptGenerator.DSLBasicConditional;
import ai.synthesis.dslForScriptGenerator.DSLBasicConditional.function... | 3,682 | 35.465347 | 184 | java |
MicroRTS | MicroRTS-master/src/ai/synthesis/dslForScriptGenerator/DSLBasicConditional/functions/AbstractConditionalFunction.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ai.synthesis.dslForScriptGenerator.DSLBasicConditional.functions;
import ai.synthesis.dslForScriptGenerator.DSLCommand.DSLEnum... | 3,623 | 30.241379 | 119 | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.