Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Fixed bug - Random map array lists continued to accumulate furniture… #371

Merged
merged 1 commit into from
Jun 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -359,4 +359,13 @@ private static boolean timeout()
{
return time < MAX_TIME;
}

public static void clearRandomGenerator()
{
obstacles.clear();
lShape.clear();
uShape.clear();
iShape.clear();
tShape.clear();
}
}
5 changes: 3 additions & 2 deletions src/test/java/experiments/Experiments.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class Experiments
*/
public static void main(String[] args)
{
runCapture();
runEvasion();
}

private static void runCoverage(String map_name)
Expand Down Expand Up @@ -135,7 +135,7 @@ private static void runCapture()
public static void runEvasion()
{
StateTable.setDefaultCaptureAgent(AgentType.CAPTURE);
StateTable.setDefaultEvasionAgent(AgentType.EVASION_DIRECTED);
StateTable.setDefaultEvasionAgent(AgentType.EVASION_RANDOM);

final String testName = "Evasion_Experiment_" +
StateTable.getDefaultCaptureAgent() + "_" +
Expand Down Expand Up @@ -189,6 +189,7 @@ private static void runInfiltration(String map_name)

private static Map generateRandomMap()
{
RandomSettingsGenerator.clearRandomGenerator();
Settings settings = RandomSettingsGenerator.generateRandomSettings();
settings.setNoOfGuards(1);
settings.setNoOfIntruders(1);
Expand Down