Here are the Frequently Asked Questions about the Vacuum Cleaning Agent project.
I find the best way to compile Java packages is to be at the directory above the package and issue a command like javac vacworld/VacuumWorld.java You may have to set your CLASSPATH environment variable to "." as well. This says the current directory is in Java's class path.
Method add(agent.Agent) not found in class java.util.Vector.I haven't altered any of your files. Is it somehow the version of jdk I'm running?
Yes, it is most likely the version of JDK you are running. Vector.add() is a method from version 1.2 of Java. You are probably using an earlier version (type "java -version" to find out). See if you can run /apps/j2se/bin/java. If so, just add "/apps/j2se/bin" to your path (before whatever directory your current version of java is in, of course), so that this will become your default version of Java. If Java 1.2 isn't accessible from the machine you're using, you could always just change the line to the Java 1.0 equivalent. That is. change:
agents.add(agent);to
agents.addElement(agent);
The primary criteria for intelligence is the ability to complete the task, regardless of room configuration. As mentioned in the assignment, the most intelligent agents will also make efficient use of their moves. That is, the fewer forwards, turns, and sucks that agent performs, the more intelligent it is (assuming it completes the task successfully). In general, turns will be considered less expensive than forwards and sucks.
Since the environment is static, thinking time is not critical. Thinking times between moves on the order of a few minutes are perfectly acceptable (although it is possible to develop good agents who can make decsions much more quickly). However, agents that regularly take five or more minutes between decisions may be penalized for being implemented inefficiently.
1 2 3 4 5 1 W 2 D D W 3 W 4 W 5 W W DThe position (1,5) will never be directly reachable by the robot. The robot will never know if it is empty or if there is an obstacle there. Thus it will think it has not completed the job.
The robot can assume that any unreachable square has a wall there (this will be the case in all examples that I test the robot on).
No, I will not use getRandomState() to test the program. I will have a set of preselected room configurations that I will test everybody's agents on.
roll = Math.random(); if (i != INIT_X && i != INIT_Y && roll <= WALL_CHANCE) { state.map[i][j] = WALL;but this does not seem correct.
Yes, that is a bug. Since I will not be using getRandomState(), it is not important, but if you want to use it to test your programs, then you should changese lines to:
roll = Math.random(); if ((i != INIT_X || j != INIT_Y) && roll <= WALL_CHANCE) { state.map[i][j] = WALL;Note, that "i != INIT_Y" was changed to "j != INIT_Y" and the previous "&&" was changed to "||".