Ejemplo n.º 1
0
        public TrainingApp(GameProcess gProcess, NeuralNet neuralNet)
        {
            gp       = gProcess;
            nn       = neuralNet;
            settings = gp.s;
            trainBox = new System.Drawing.Rectangle(0, 0, settings.SizeX / 2, settings.SizeY / 2);

            trainBox.X    = settings.SizeX / 2 - trainBox.Width / 2;
            trainBox.Y    = settings.SizeY / 2 - trainBox.Height / 2;
            TrainingNames = File.ReadAllLines($"trainfiles/{settings.Game}.names");
        }
Ejemplo n.º 2
0
        public void Start()
        {
            settings = Settings.ReadSettings();
            var nNet = NeuralNet.Create(settings.Game);

            gp = GameProcess.Create(settings);


            if (nNet == null)
            {
                var ta = new TrainingApp(gp, nNet);
                ta.startTrainingMode();
            }

            var ab = new Aimbot(settings, gp, nNet);

            ab.Start();
        }
Ejemplo n.º 3
0
        static public NeuralNet Create(string Game)
        {
            var nn = new NeuralNet();

            nn.TrainingNames = null;
            nn.yoloWrapper   = GetYolo(Game);

            if (nn.yoloWrapper == null)
            {
                return(null);
            }

            nn.TrainingNames = File.ReadAllLines($"trainfiles/{Game}.names");
            File.Copy("defaultfiles/default_trainmore.cmd", $"darknet/{Game}_trainmore.cmd", true);
            if (File.Exists($"trainfiles/{Game}.cfg"))
            {
                File.Copy($"trainfiles/{Game}.cfg", $"darknet/{Game}.cfg", true);
            }
            else
            {
                File.Copy("defaultfiles/default.cfg", $"darknet/{Game}.cfg", true);
            }

            File.Copy("defaultfiles/default.conv.15", $"darknet/{Game}.conv.15", true);
            File.Copy("defaultfiles/default.data", $"darknet/data/{Game}.data", true);

            if (File.Exists($"trainfiles/{Game}.names"))
            {
                File.Copy($"trainfiles/{Game}.names", $"darknet/{Game}.names", true);
            }
            else
            {
                File.Copy("defaultfiles/default.names", $"darknet/data/{Game}.names", true);
            }

            File.Copy("defaultfiles/default.txt", $"darknet/data/{Game}.txt", true);
            File.Copy("defaultfiles/default.cmd", $"darknet/{Game}.cmd", true);

            return(nn);
        }