From f2a2710580d25805b6465d513452d7430b54acf9 Mon Sep 17 00:00:00 2001 From: MrFoodinChina <44801001+MrFoodinChina@users.noreply.github.com> Date: Fri, 26 Jul 2019 18:09:57 +0800 Subject: [PATCH] Better Indentation --- docs/search/idastar.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/search/idastar.md b/docs/search/idastar.md index 3e099008..0eb95fb4 100644 --- a/docs/search/idastar.md +++ b/docs/search/idastar.md @@ -12,21 +12,21 @@ IDA\*,即采用迭代加深的 A\*算法。相对于 A\*算法,由于 IDA\* ```text Procedure IDA_STAR(StartState) Begin -PathLimit := H(StartState) - 1; -Succes := False; -Repeat -inc(PathLimit); -StartState.g = 0; -Push(OpenStack , StartState); -Repeat -CurrentState := Pop(OpenStack); -If Solution(CurrentState) then -Success = True -Elseif PathLimit >= CurrentState.g + H(CurrentState) then -For each Child(CurrentState) do -Push(OpenStack , Child(CurrentState)); -until Successor empty(OpenStack); -until Success or ResourceLimtsReached; + PathLimit := H(StartState) - 1; + Succes := False; + Repeat + inc(PathLimit); + StartState.g = 0; + Push(OpenStack , StartState); + Repeat + CurrentState := Pop(OpenStack); + If Solution(CurrentState) then + Success = True + Elseif PathLimit >= CurrentState.g + H(CurrentState) then + For each Child(CurrentState) do + Push(OpenStack , Child(CurrentState)); + until Successor empty(OpenStack); + until Success or ResourceLimtsReached; end; ``` -- 2.11.0