// todo: the user should be able to change the search algorithm during the course of the program, as well as other parameters like depth, TT capacity, etc static AI GetAI() { ISearchAlgorithm inner; while (true) { Write("Pick AI strategy [mtdf, mtdf-ids (default)]: "); string input = ReadLine().Trim().ToLower(); switch (input) { case "mtdf": inner = new Mtdf() { Depth = SearchDepth }; inner.Tt = inner.MakeTt(TtCapacity); break; case "": case "mtdf-ids": inner = new MtdfIds() { Depth = SearchDepth }; inner.Tt = inner.MakeTt(TtCapacity); break; default: continue; } return(new AI(inner)); } }
public void Mtdf() { var mtdf = new Mtdf() { Depth = Depth, }; mtdf.Tt = mtdf.MakeTt(TtCapacity); mtdf.Search(State.Start); }