Skip to content

Agent Tests#560

Merged
norvig merged 2 commits into
aimacode:masterfrom
antmarakis:patch-3
Jun 27, 2017
Merged

Agent Tests#560
norvig merged 2 commits into
aimacode:masterfrom
antmarakis:patch-3

Conversation

@antmarakis
Copy link
Copy Markdown
Collaborator

@antmarakis antmarakis commented Jun 24, 2017

Added tests for RandomVacuumAgent and compare_agents (the last one comes from #395, after I edited grammar/spelling).

We can now close #395. Thanks @articuno12 for the original test.

NOTE: I did not have much time to research this, but from the tests I ran it seems that RandomVacuumAgent always leaves the environment in the same state. If that is not the case and the agent leaves the environment in a random state, let me know and I will remove/update the test.

EDIT: Set random.seed, so it will now pass each time.

@antmarakis
Copy link
Copy Markdown
Collaborator Author

UPDATE: Set random.seed, so that it doesn't matter if the function is deterministic or not. It will now pass every time.

@norvig
Copy link
Copy Markdown
Collaborator

norvig commented Jun 27, 2017

If there is no dirt in an environment, then anything an agent does, even a random one, will not add dirt.

@norvig norvig merged commit 5187c0e into aimacode:master Jun 27, 2017
@antmarakis antmarakis deleted the patch-3 branch June 27, 2017 20:02
dj5x5 pushed a commit to dj5x5/aima-python that referenced this pull request Jul 17, 2025
* add RandomVacuumAgent + CompareAgents

* set random.seed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants