Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pa:laboratoare:laborator-12 [2020/05/31 20:10]
darius.neatu
pa:laboratoare:laborator-12 [2020/05/31 20:27] (current)
darius.neatu
Line 137: Line 137:
         open ← open - { s }         open ← open - { s }
  
-        // daca este stare finala+        // daca este stare finala
         if is_goal(s) ​         if is_goal(s) ​
             // reconstituie drumul de la s la s_i             // reconstituie drumul de la s la s_i
Line 149: Line 149:
             // pentru fiecare copil c al starii s             // pentru fiecare copil c al starii s
             for each c in expand(s)             for each c in expand(s)
-                if g(n) + w[s][c] < g(c)+                if g(s) + w[s][c] < g(c)
                     // actualizez distanta si parintele                     // actualizez distanta si parintele
                     g(c) ← g(s) + w[s][c]                     g(c) ← g(s) + w[s][c]
pa/laboratoare/laborator-12.txt · Last modified: 2020/05/31 20:27 by darius.neatu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0