public void Store(NNEngine engine)
        {
            string filename = Path.Combine(this.directory, engine.Id);

            using (var stream = new FileStream(filename, FileMode.Create, FileAccess.Write, FileShare.Read))
                using (var writer = new BinaryWriter(stream))
                {
                    engine.Serialize(writer);
                }
        }
示例#2
0
 public EngineWithScore(NNEngine engine)
 {
     this.Engine = engine;
     this.Score  = 0;
 }