Example #1
0
        public static void DoExam <T>(ISmartBot <T> smartBot) where T : LabeledDataPoint
        {
            smartBot.Load(modelSavePath);

            var score = 0;

            foreach (var data in ExamData)
            {
                var isInactive = smartBot.Predict(smartBot.ExtractDataPoint(data.Data));
                if (isInactive == data.IsUnused)
                {
                    ++score;
                }
            }

            Console.WriteLine($"Score: {score}/{ExamData.Count}");
        }
        private static async Task SimulateExample <T>(ISmartBot <T> smartBot) where T : LabeledDataPoint
        {
            await smartBot.Load(modelSavePath);

            var bots = new IBot[]
            {
                smartBot,
                smartBot,
                smartBot,
                smartBot
            };

            const bool saveGamelogFile = true;
            var        simulation      = await BomberjamRunner.StartSimulation(bots, saveGamelogFile);

            while (!simulation.IsFinished)
            {
                await simulation.ExecuteNextTick();
            }

            Console.WriteLine("Simulation completed!");
        }
Example #3
0
        private static async Task Game <T>(ISmartBot <T> smartBot) where T : LabeledDataPoint
        {
            await smartBot.Load(modelSavePath);

            await PlayInBrowserExample(smartBot);
        }