Skip to content

Suggested modification to Online-DFS-Agent (aima3e Figure 4.21) #26

Open
@ctjoreilly

Description

@ctjoreilly

To avoid cycles in the DFS traversal, modifying the following conditional from:


if s is not null then
  result[s, a] ← s'
  add s to front of unbacktracked[s']

to:

if s is not null and s′result[s, a] then
  result[s, a] ← s'
  add s to front of unbacktracked[s']

without this additional check it is very easy to end up cycling between states, depending on the order of the actions that are tried from each state. Both the current aima-java and aima-python reference implementations contain this additional check.

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