📄 param.h
字号:
/* Optann, a Khepera simulator including a separate GA and ANN (Genetic Algoritm, Artificial Neural Net). Copyright (C) 2000 Johan Carlsson (johanc@ida.his.se) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */#ifndef PARAM_H#define PARAM_H#include <stdio.h>#include <stdlib.h>#include <string.h>/* Defines *//** Resolution of the rod camera in pixels */#define ROD_RESOLUTION 10/** Camera mmphfl.. *cough* */#define ROD_ANGLE 36/** Range of rod camera */#define ROD_MAX_DISTANCE 170/** position of energy sensor in input array */#define EnergySensor 9/** position of gripper sensor in input array */#define GripperSensor 10 /** position of ground sensor in input array */#define GroundSensor 11/** position of compass sensor in input array */#define CompassSensor 12/** start position of light bulb sensors in input array */#define LightBulbSensor 13/** start position of rod camera in input array */#define RodSensor (LightBulbSensor + 8)/** the size of the input array */#define NETWORK_INPUTS (RodSensor + ROD_RESOLUTION)/* Serial thingis */extern int useSerialLine;extern char **serialDevice;extern int *baudRate;/* parameters */extern int updateDelay;extern int gfxUpdate;extern int userUpdate;extern int useCompass;extern int useEnergy;extern int useGround;extern int useRodSensor;extern int useRodNoise;extern int useLightbulbSensors;extern int nrOfFrontInfrared;extern int nrOfBackInfrared;extern int gripperSensor;extern float xScale;extern int notTrajactoryRobot;extern int selectionMethod;extern int bitMutateProbability;extern int seed; extern int amoebaEpochs; extern int nrOfGenerations; extern int nrOfIndivids;extern int nrOfKids; extern int nrOfFathers; extern int startGeneration; extern int verboseLevel; extern int sensorNoise; extern int paramNrOfRobots;extern float amountOfNoise;extern int testSameStartPosition;extern int ffitness;extern int useGripper; extern int moveObstacles;extern int gripperNoise;extern int nrOfSteps; extern int saveGeneration;extern int nrOfIndividsToLog;extern char robotPicFile[100];extern char worldPicFile[100];extern char logPath[100];extern char worldPath[100];extern char cameraPath[100];extern char worldFile[100];extern char smallCamera[100];extern char bigCamera[100];extern char wallCamera[100];extern char lightCamera[100];extern char motorCamera[100];extern char weightsFile[100];extern char fitnessFile[100];extern char robotCamera[100];extern int **mapping;extern double **input;extern double **simoutput;/** Number of lines that the param parser can handle */#define CONFIG_FILE_LINES 1000void loadParams(char *paramFile);#endif /* PARAM_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -