public OpponentModellingBot(PlayerEntity entity) : base(entity) { var serializer = new OpponentSerializer(); this.opponent = serializer.Deserialize(); randomBot = new RandomBot(entity); }
public MinimalRegretBot(PlayerEntity entity) : base(entity) { lock (thisLock) { var appDomain = System.AppDomain.CurrentDomain; var basePath = appDomain.RelativeSearchPath ?? appDomain.BaseDirectory; var filePath = Path.Combine(basePath, "CFR", "cfr-tree.proto"); using (var fs = new FileStream(filePath, FileMode.Open)) { trainedTree = Serializer.Deserialize <Dictionary <long, RegretGameNode <ActionBucket> > >(fs); } } randomBot = new RandomBot(entity); }