public QuiescenceSearch(ArtemisEngine engine, GameState gameState, PositionEvaluator evaluator, MoveEvaluator moveEvaluator) { this.engine = engine; this.gameState = gameState; this.evaluator = evaluator; this.moveEvaluator = moveEvaluator; }
public SearchThread(ArtemisEngine engine, ThreadMaster master, GameState gameState, TranspositionTable transpositionTable, ConcurrentDictionary <ulong, bool> searchedNodes, IEngineConfig config) { this.master = master; this.gameState = gameState; EvaluationConfig evConfig = new EvaluationConfig(); evaluator = new PositionEvaluator(gameState, evConfig); moveEvaluator = new MoveEvaluator(evConfig); quietSearch = new QuiescenceSearch(engine, gameState, evaluator, moveEvaluator); pvSearch = new PVSearch(engine, gameState, transpositionTable, killerMoves, evaluator, moveEvaluator, quietSearch, searchedNodes, config); this.config = config; }
public PVSearch(ArtemisEngine engine, GameState gameState, TranspositionTable transpositionTable, KillerMoves killerMoves, PositionEvaluator evaluator, MoveEvaluator moveEvaluator, QuiescenceSearch quietSearch, ConcurrentDictionary <ulong, bool> searchedNodes, IEngineConfig config) { this.engine = engine; this.gameState = gameState; this.transpositionTable = transpositionTable; this.killerMoves = killerMoves; this.evaluator = evaluator; this.moveEvaluator = moveEvaluator; this.quietSearch = quietSearch; this.searchedNodes = searchedNodes; this.config = config; }
public ThreadMaster(ArtemisEngine engine, GameState gameState, TranspositionTable transpositionTable, IEngineConfig config) { this.gameState = gameState; this.transpositionTable = transpositionTable; this.config = config; threadsNum = Environment.ProcessorCount; searchThreads = new SearchThread[threadsNum]; for (int t = 0; t < threadsNum; t++) { GameState threadState = new GameState(gameState.PregeneratedAttacks, gameState.ZobristHashUtils); searchThreads[t] = new SearchThread(engine, this, threadState, transpositionTable, searchedNodes, config); } }
public GameManager(Canvas boardCanvas, MovesHistory movesHistory, ISettings settings) { this.boardCanvas = boardCanvas; this.movesHistory = movesHistory; this.settings = settings; engineConfig = settings; boardCanvas.Background = new ImageBrush { ImageSource = GetImage("board.png") }; lastMoveHighlight = new LastMoveHighlight(this, boardCanvas); gameState = new GameState(pregeneratedAttacks, zobristHashUtils); openingBook = new OpeningBook(pregeneratedAttacks, zobristHashUtils); engine = new ArtemisEngine(gameState, engineConfig, openingBook); }
public void AAMLLoadDirectoryFullTest() { ArtemisEngine.Setup("game.constants", Setup); ArtemisEngine.Begin(Initialize); AAMLFileReader fileReader = new AAMLFileReader("../../Animation/LoadDirectoryFullAAMLTestFile.aaml"); try { fileReader.Read(); } catch (Exception e) { Assert.Fail(e.Message + "\nAt:\n" + e.StackTrace); } }
static void Initialize() { ArtemisEngine.RegisterMultiforms(typeof(MultiformTemplate)); /* Alternative Ways of registering the MultiformTemplate: * * ArtemisEngine.RegisterMultiforms(new MultiformTemplate("name")); * * ArtemisEngine.RegisterMultiforms(new MultiformTemplate()); * * The user can also decorate the MultiformTemplate class with a * NamedMultiformAttribute. */ ArtemisEngine.StartWith("MultiformTemplate"); }
public void AAMLLoadDirectoryTest() { ArtemisEngine.Setup("game.constants", Setup); ArtemisEngine.Begin(Initialize); AAMLFileReader fileReader = new AAMLFileReader("../../Animation/LoadDirectoryAAMLTestFile.aaml"); try { fileReader.Read(); Assert.AreEqual(20, fileReader.Map.SpriteSheet.LoadedTextures.Count); } catch (Exception e) { Assert.Fail(e.Message + "\nAt:\n" + e.StackTrace); } }
static void Initialize() { var image = AssetLoader.Load <Texture2D>("text-image1"); AssetLoader.RegisterAssetImporter <string>(new TestAssetImporter(), ".test"); AssetLoader.PrepareAssetGroup("test-group", SearchOption.AllDirectories); var image2 = AssetLoader.Load <Texture2D>("test-group.test-image1"); var group = AssetLoader.GetGroup("test-group"); var image3 = group.GetAsset <Texture2D>("test-image1"); var text = group.GetAsset <string>("test-asset"); Console.WriteLine(text); ArtemisEngine.RegisterMultiforms( new MainMultiform1("Main1"), new MainMultiform2("Main2")); ArtemisEngine.StartWith("Main2"); AssetLoader.UnloadAssetGroup("test-group"); }
static void Main() { ArtemisEngine.Setup("game.constants", Setup); ArtemisEngine.Begin(Initialize); }
static void Initialize() { ArtemisEngine.RegisterMultiforms(new MultiformTemplate()); ArtemisEngine.StartWith("MultiformTemplate"); }
static void Main() { ArtemisEngine.Setup("gamesetup.xml", Initialize); }