Skip to content

Commit

Permalink
updated the way we pass facts to reason again to be same as reasoning…
Browse files Browse the repository at this point in the history
… for the first time (docs)
  • Loading branch information
dyumanaditya committed Feb 27, 2025
1 parent 49aa83a commit 6cadb6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/source/user_guide/8_advanced_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Reasoning Multiple Times
-------------------------
PyReason allows you to reason over the graph multiple times. This can be useful when you want to reason over the graph iteratively
and add facts that were not available before. To reason over the graph multiple times, you can set ``again=True`` in ``pr.reason(again=True)``.
To specify additional facts, use the ``facts`` parameter in ``pr.reason(...)``. These parameters allow you to add additional
facts to the graph before reasoning again. The facts are specified as a list of PyReason facts.
To specify additional facts or rules, you can add them as you normally would using ``pr.add_fact`` and ``pr.add_rule``.

.. note::
When reasoning multiple times, the time continues to increment. Therefore any facts that are added should take this into account.
The timestep parameter specifies how many additional timesteps to reason. For example, if the initial reasoning converges at
timestep 5, and you want to reason for 3 more timesteps, you can set ``timestep=3`` in ``pr.reason(timestep=3, again=True, facts=[some_new_fact])``.
timestep 5, and you want to reason for 3 more timesteps, you can set ``timestep=3`` in ``pr.reason(timestep=3, again=True)``.
If you are specifying new facts, take this into account when setting their ``start_time`` and ``end_time``.

0 comments on commit 6cadb6d

Please sign in to comment.