public Bot(Maze maze, EngineSettings engineSettings, WallGrid walls, BrainFactory brainFactory, EyeFactory eyeFactory) { _maze = maze; _engineSettings = engineSettings; _walls = walls; _numEyes = engineSettings.BotEyes; _energyStep = 1.0; var neurons = _numEyes + (engineSettings.ThinkDistance ? 1 : 0) + (engineSettings.ThinkPath ? 5 : 0) + (engineSettings.ThinkVelocity ? 3 : 0); Brain = brainFactory.Create(neurons, 2); _eyes = new Eye[_numEyes]; Velocity = new Ray(new CoordD(0.5, 0.5), 0.0, engineSettings.BotSpeed); for (var i = 0; i < _numEyes; ++i) { var theta = i / (double)_numEyes * Consts.HalfTurn - Consts.QuarterTurn; _eyes[i] = eyeFactory.Create(Velocity.Origin, 2, 0, theta, 100); } Init(new CoordD(.5,.5)); }
public GeneticAlg(EngineSettings engineSettings, Maze maze, WallGrid walls, BotFactory botFactory) { _engineSettings = engineSettings; _maze = maze; _walls = walls; _botFactory = botFactory; Reset(); }
public MazeDrawer(StringFormat fontFormat, Maze maze, WallGrid walls, Settings settings, EngineSettings engineSettings) { _fontFormat = fontFormat; _maze = maze; _walls = walls; _settings = settings; _engineSettings = engineSettings; }
public Maze(WallGrid walls, Random rand) { _walls = walls; _rand = rand; }