Skip to content

Add test for SimpleReflexAgent #768

@apb7

Description

@apb7

Hello, @norvig and @MrDupin! I would like to add tests for the SimpleReflexAgentProgram in test_agents.py.
Also, I had a doubt regarding this. Currently, we have a rule_match function which looks like this:

def rule_match(state, rules):
    """Find the first rule that matches state."""
    for rule in rules:
        if rule.matches(state):
            return rule

We do not have a matches function for the rule. We need to design this function before we go for the test. How should we go about this? We can create a Rule class in test_agents.py only without changing agents.py for the testing part. Please suggest!
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions