From e14c34b980fdc2bf19eb326e7d4b967f0ad6a1c0 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Fri, 17 Mar 2017 17:17:51 +0530 Subject: [PATCH 01/69] Update utils.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in pseudo code the sequence of arguments is " WEIGHTED-SAMPLE-WITH-REPLACEMENT(N, S, W)"   --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 3c070293e..714512ae0 100644 --- a/utils.py +++ b/utils.py @@ -193,7 +193,7 @@ def probability(p): return p > random.uniform(0.0, 1.0) -def weighted_sample_with_replacement(seq, weights, n): +def weighted_sample_with_replacement(n,seq, weights): """Pick n samples from seq at random, with replacement, with the probability of each element in proportion to its corresponding weight.""" From 82983326e8365516366b7ebb6f2f7d12941dd82d Mon Sep 17 00:00:00 2001 From: sofmonk Date: Fri, 17 Mar 2017 17:27:54 +0530 Subject: [PATCH 02/69] Update utils.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in pseudo code the sequence of arguments is " WEIGHTED-SAMPLE-WITH-REPLACEMENT(N, S, W)"  same must follow in function "particle_filtering" in the file probability.py --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 3c070293e..714512ae0 100644 --- a/utils.py +++ b/utils.py @@ -193,7 +193,7 @@ def probability(p): return p > random.uniform(0.0, 1.0) -def weighted_sample_with_replacement(seq, weights, n): +def weighted_sample_with_replacement(n,seq, weights): """Pick n samples from seq at random, with replacement, with the probability of each element in proportion to its corresponding weight.""" From 588c3184cc81f7cb1fcf6a27ecfdca4711e2a359 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Fri, 17 Mar 2017 17:41:01 +0530 Subject: [PATCH 03/69] Update learning.py weight_sample_with_replacement sequence of args --- learning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learning.py b/learning.py index df5d6fce3..3e7f4690c 100644 --- a/learning.py +++ b/learning.py @@ -746,7 +746,7 @@ def weighted_replicate(seq, weights, n): wholes = [int(w * n) for w in weights] fractions = [(w * n) % 1 for w in weights] return (flatten([x] * nx for x, nx in zip(seq, wholes)) + - weighted_sample_with_replacement(seq, fractions, n - sum(wholes))) + weighted_sample_with_replacement(n - sum(wholes),seq, fractions, )) def flatten(seqs): return sum(seqs, []) From 8b2b94beee2d6041672238021b0380e6dd704802 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Fri, 17 Mar 2017 17:42:18 +0530 Subject: [PATCH 04/69] Update probability.py weighted_sample_with_replacement sequence of args --- probability.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/probability.py b/probability.py index abbc07791..d28a8a38b 100644 --- a/probability.py +++ b/probability.py @@ -651,5 +651,5 @@ def particle_filtering(e, N, HMM): w[i] = float("{0:.4f}".format(w[i])) # STEP 2 - s = weighted_sample_with_replacement(s, w, N) + s = weighted_sample_with_replacement(N,s,w) return s From 35c9d51ac5b6a79108c0a0384c0b6b41cb6340b1 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 11:03:34 +0530 Subject: [PATCH 05/69] Update search.py --- search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search.py b/search.py index 04d5b6c51..e4e20da3f 100644 --- a/search.py +++ b/search.py @@ -587,7 +587,7 @@ def genetic_algorithm(population, fitness_fn, ngen=1000, pmut=0.1): new_population = [] for i in range(len(population)): fitnesses = map(fitness_fn, population) - p1, p2 = weighted_sample_with_replacement(population, fitnesses, 2) + p1, p2 = weighted_sample_with_replacement(2,population, fitnesses) child = p1.mate(p2) if random.uniform(0, 1) < pmut: child.mutate() From 4a678711bb1e3e663efcf6d4083cf40528c9d687 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 13:29:51 +0530 Subject: [PATCH 06/69] included double_tennis_problem from chapter 11 --- planning.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/planning.py b/planning.py index a17677460..c8e1e3d87 100644 --- a/planning.py +++ b/planning.py @@ -526,3 +526,43 @@ def spare_tire_graphplan(): graphplan.graph.expand_graph() if len(graphplan.graph.levels)>=2 and graphplan.check_leveloff(): return None + + + +def double_tennis_problem(): + init = [expr('At(A, LeftBaseLine)'), + expr('At(B, RightNet)'), + expr('Approaching(Ball, RightBaseLine)'), + expr('Partner(A,B)'), + expr('Partner(A,B)')] + + + def goal_test(kb): + required = [expr('Goal(Returned(Ball'), + expr('At(a, RightNet)'), + expr('At(a, LeftNet)')] + for q in required: + if kb.ask(q) is False: + return False + return True + + + ###actions + #hit + precond_pos=[expr('Approaching(Ball,loc'),expr('At(actor,loc')] + precond_neg=[] + effect_add=[expr('Returned(Ball')] + effect_rem = [] + hit = Action(expr('Hit(actor,Ball'), [precond_pos, precond_neg], [effect_add, effect_rem]) + + ##go + precond_pos = [ expr('At(actor,loc')] + precond_neg = [] + effect_add = [expr('At(actor,to')] + effect_rem = [expr('At(actor,loc')] + go = Action(expr('Go(actor,to'), [precond_pos, precond_neg], [effect_add, effect_rem]) + + return PDLL(init, [hit, go], goal_test) + + + From 0be9f2c3c03a19d2a3ac383f0d9f859db7eef5e4 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 13:33:56 +0530 Subject: [PATCH 07/69] Update planning.py added double_tennis_problem from chapter 11 , figure 11.10 --- planning.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/planning.py b/planning.py index a17677460..347fd944d 100644 --- a/planning.py +++ b/planning.py @@ -526,3 +526,43 @@ def spare_tire_graphplan(): graphplan.graph.expand_graph() if len(graphplan.graph.levels)>=2 and graphplan.check_leveloff(): return None + + +def double_tennis_problem(): + init = [expr('At(A, LeftBaseLine)'), + expr('At(B, RightNet)'), + expr('Approaching(Ball, RightBaseLine)'), + expr('Partner(A,B)'), + expr('Partner(A,B)')] + + + def goal_test(kb): + required = [expr('Goal(Returned(Ball'), + expr('At(a, RightNet)'), + expr('At(a, LeftNet)')] + for q in required: + if kb.ask(q) is False: + return False + return True + + + ###actions + #hit + precond_pos=[expr('Approaching(Ball,loc'),expr('At(actor,loc')] + precond_neg=[] + effect_add=[expr('Returned(Ball')] + effect_rem = [] + hit = Action(expr('Hit(actor,Ball'), [precond_pos, precond_neg], [effect_add, effect_rem]) + + ##go + precond_pos = [ expr('At(actor,loc')] + precond_neg = [] + effect_add = [expr('At(actor,to')] + effect_rem = [expr('At(actor,loc')] + go = Action(expr('Go(actor,to'), [precond_pos, precond_neg], [effect_add, effect_rem]) + + return PDLL(init, [hit, go], goal_test) + + + + From 76bd895ae5327c632672c6e0b9b98a54ffddbfa6 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 13:38:12 +0530 Subject: [PATCH 08/69] Update utils.py added missing space after comma --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 714512ae0..6d181dd4c 100644 --- a/utils.py +++ b/utils.py @@ -193,7 +193,7 @@ def probability(p): return p > random.uniform(0.0, 1.0) -def weighted_sample_with_replacement(n,seq, weights): +def weighted_sample_with_replacement(n, seq, weights): """Pick n samples from seq at random, with replacement, with the probability of each element in proportion to its corresponding weight.""" From f9b8ad475792f9ef9a613c3b85e5eddf22f0c871 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 13:40:50 +0530 Subject: [PATCH 09/69] Update learning.py added missing space after comma --- learning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learning.py b/learning.py index 3e7f4690c..88d5e474b 100644 --- a/learning.py +++ b/learning.py @@ -746,7 +746,7 @@ def weighted_replicate(seq, weights, n): wholes = [int(w * n) for w in weights] fractions = [(w * n) % 1 for w in weights] return (flatten([x] * nx for x, nx in zip(seq, wholes)) + - weighted_sample_with_replacement(n - sum(wholes),seq, fractions, )) + weighted_sample_with_replacement(n - sum(wholes), seq, fractions)) def flatten(seqs): return sum(seqs, []) From a60ef5a6a1a2b25e4fe985636163a00e3c27f5f4 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 13:41:50 +0530 Subject: [PATCH 10/69] Update probability.py added missing space after comma --- probability.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/probability.py b/probability.py index d28a8a38b..0d7b996f4 100644 --- a/probability.py +++ b/probability.py @@ -651,5 +651,5 @@ def particle_filtering(e, N, HMM): w[i] = float("{0:.4f}".format(w[i])) # STEP 2 - s = weighted_sample_with_replacement(N,s,w) + s = weighted_sample_with_replacement(N ,s ,w) return s From f1b4e258e835306a02c581790753e3130d5cc16b Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 13:43:28 +0530 Subject: [PATCH 11/69] Update search.py added missing space after comma --- search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search.py b/search.py index e4e20da3f..45e061119 100644 --- a/search.py +++ b/search.py @@ -587,7 +587,7 @@ def genetic_algorithm(population, fitness_fn, ngen=1000, pmut=0.1): new_population = [] for i in range(len(population)): fitnesses = map(fitness_fn, population) - p1, p2 = weighted_sample_with_replacement(2,population, fitnesses) + p1, p2 = weighted_sample_with_replacement(2, population, fitnesses) child = p1.mate(p2) if random.uniform(0, 1) < pmut: child.mutate() From d45d8d4b052a4a33bc3327fa7e7b68c7fa2115ae Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 13:52:52 +0530 Subject: [PATCH 12/69] Update planning.py --- planning.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/planning.py b/planning.py index 347fd944d..b94a8526e 100644 --- a/planning.py +++ b/planning.py @@ -535,11 +535,8 @@ def double_tennis_problem(): expr('Partner(A,B)'), expr('Partner(A,B)')] - def goal_test(kb): - required = [expr('Goal(Returned(Ball'), - expr('At(a, RightNet)'), - expr('At(a, LeftNet)')] + required = [expr('Goal(Returned(Ball'), expr('At(a, RightNet)'), expr('At(a, LeftNet)')] for q in required: if kb.ask(q) is False: return False @@ -548,18 +545,18 @@ def goal_test(kb): ###actions #hit - precond_pos=[expr('Approaching(Ball,loc'),expr('At(actor,loc')] + precond_pos=[expr("Approaching(Ball,loc)"), expr("At(actor,loc)")] precond_neg=[] - effect_add=[expr('Returned(Ball')] + effect_add=[expr("Returned(Ball)")] effect_rem = [] - hit = Action(expr('Hit(actor,Ball'), [precond_pos, precond_neg], [effect_add, effect_rem]) + hit = Action(expr("Hit(actor,Ball)"), [precond_pos, precond_neg], [effect_add, effect_rem]) ##go - precond_pos = [ expr('At(actor,loc')] + precond_pos = [ expr("At(actor,loc)")] precond_neg = [] - effect_add = [expr('At(actor,to')] - effect_rem = [expr('At(actor,loc')] - go = Action(expr('Go(actor,to'), [precond_pos, precond_neg], [effect_add, effect_rem]) + effect_add = [expr("At(actor,to)")] + effect_rem = [expr("At(actor,loc)")] + go = Action(expr("Go(actor,to)"), [precond_pos, precond_neg], [effect_add, effect_rem]) return PDLL(init, [hit, go], goal_test) From c43fd7ee8a7eb63df26fac8f046bac4e79a76f2e Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 13:53:43 +0530 Subject: [PATCH 13/69] Update planning.py --- planning.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/planning.py b/planning.py index b94a8526e..d7bf3c44f 100644 --- a/planning.py +++ b/planning.py @@ -542,8 +542,7 @@ def goal_test(kb): return False return True - - ###actions + ##actions #hit precond_pos=[expr("Approaching(Ball,loc)"), expr("At(actor,loc)")] precond_neg=[] @@ -551,7 +550,7 @@ def goal_test(kb): effect_rem = [] hit = Action(expr("Hit(actor,Ball)"), [precond_pos, precond_neg], [effect_add, effect_rem]) - ##go + #go precond_pos = [ expr("At(actor,loc)")] precond_neg = [] effect_add = [expr("At(actor,to)")] From dc20b935344a62bb6069fa2b1b11e1b35e99687f Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 13:57:56 +0530 Subject: [PATCH 14/69] Update planning.py --- planning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planning.py b/planning.py index d7bf3c44f..4002cb54b 100644 --- a/planning.py +++ b/planning.py @@ -536,7 +536,7 @@ def double_tennis_problem(): expr('Partner(A,B)')] def goal_test(kb): - required = [expr('Goal(Returned(Ball'), expr('At(a, RightNet)'), expr('At(a, LeftNet)')] + required = [expr('Goal(Returned(Ball))'), expr('At(a, RightNet)'), expr('At(a, LeftNet)')] for q in required: if kb.ask(q) is False: return False From 4bac0585b91b91419c2ec5246bc288c46d7c05f8 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 15:01:17 +0530 Subject: [PATCH 15/69] Update planning.py --- planning.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/planning.py b/planning.py index 4002cb54b..6a159cec9 100644 --- a/planning.py +++ b/planning.py @@ -558,7 +558,3 @@ def goal_test(kb): go = Action(expr("Go(actor,to)"), [precond_pos, precond_neg], [effect_add, effect_rem]) return PDLL(init, [hit, go], goal_test) - - - - From cdbbde70057d08467bc20b6bddfb0f770d84224c Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 17:01:54 +0530 Subject: [PATCH 16/69] Update planning.py --- planning.py | 67 ++++++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/planning.py b/planning.py index 4002cb54b..6fb952a8b 100644 --- a/planning.py +++ b/planning.py @@ -237,6 +237,39 @@ def goal_test(kb): return PDLL(init, [eat_cake, bake_cake], goal_test) + +def double_tennis_problem(): + init = [expr('At(A, LeftBaseLine)'), + expr('At(B, RightNet)'), + expr('Approaching(Ball, RightBaseLine)'), + expr('Partner(A,B)'), + expr('Partner(A,B)')] + + def goal_test(kb): + required = [expr('Goal(Returned(Ball))'), expr('At(a, RightNet)'), expr('At(a, LeftNet)')] + for q in required: + if kb.ask(q) is False: + return False + return True + + ##actions + #hit + precond_pos=[expr("Approaching(Ball,loc)"), expr("At(actor,loc)")] + precond_neg=[] + effect_add=[expr("Returned(Ball)")] + effect_rem = [] + hit = Action(expr("Hit(actor,Ball)"), [precond_pos, precond_neg], [effect_add, effect_rem]) + + #go + precond_pos = [ expr("At(actor,loc)")] + precond_neg = [] + effect_add = [expr("At(actor,to)")] + effect_rem = [expr("At(actor,loc)")] + go = Action(expr("Go(actor,to)"), [precond_pos, precond_neg], [effect_add, effect_rem]) + + return PDLL(init, [hit, go], goal_test) + + class Level(): """ Contains the state of the planning problem @@ -528,37 +561,3 @@ def spare_tire_graphplan(): return None -def double_tennis_problem(): - init = [expr('At(A, LeftBaseLine)'), - expr('At(B, RightNet)'), - expr('Approaching(Ball, RightBaseLine)'), - expr('Partner(A,B)'), - expr('Partner(A,B)')] - - def goal_test(kb): - required = [expr('Goal(Returned(Ball))'), expr('At(a, RightNet)'), expr('At(a, LeftNet)')] - for q in required: - if kb.ask(q) is False: - return False - return True - - ##actions - #hit - precond_pos=[expr("Approaching(Ball,loc)"), expr("At(actor,loc)")] - precond_neg=[] - effect_add=[expr("Returned(Ball)")] - effect_rem = [] - hit = Action(expr("Hit(actor,Ball)"), [precond_pos, precond_neg], [effect_add, effect_rem]) - - #go - precond_pos = [ expr("At(actor,loc)")] - precond_neg = [] - effect_add = [expr("At(actor,to)")] - effect_rem = [expr("At(actor,loc)")] - go = Action(expr("Go(actor,to)"), [precond_pos, precond_neg], [effect_add, effect_rem]) - - return PDLL(init, [hit, go], goal_test) - - - - From 86615b38a99d6019e3f81c18a5bf4ae702d3d54a Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 17:09:40 +0530 Subject: [PATCH 17/69] Update planning.py --- planning.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/planning.py b/planning.py index 6fb952a8b..c1130dd2f 100644 --- a/planning.py +++ b/planning.py @@ -237,7 +237,6 @@ def goal_test(kb): return PDLL(init, [eat_cake, bake_cake], goal_test) - def double_tennis_problem(): init = [expr('At(A, LeftBaseLine)'), expr('At(B, RightNet)'), @@ -269,7 +268,6 @@ def goal_test(kb): return PDLL(init, [hit, go], goal_test) - class Level(): """ Contains the state of the planning problem From 9d272b73dacef0520709e9340498935206b02ee3 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 17:26:13 +0530 Subject: [PATCH 18/69] Update test_agents.py pep8 changes, showed flake8 errors --- tests/test_agents.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/tests/test_agents.py b/tests/test_agents.py index 89ee3fcf3..7d251f547 100644 --- a/tests/test_agents.py +++ b/tests/test_agents.py @@ -1,21 +1,23 @@ from agents import Direction + def test_move_forward(): d = Direction("up") - l1 = d.move_forward((0,0)) - assert l1 == (0,-1) + l1 = d.move_forward((0, 0)) + assert l1 == (0, -1) d = Direction(Direction.R) - l1 = d.move_forward((0,0)) - assert l1 == (1,0) + l1 = d.move_forward((0, 0)) + assert l1 == (1, 0) d = Direction(Direction.D) - l1 = d.move_forward((0,0)) - assert l1 == (0,1) + l1 = d.move_forward((0, 0)) + assert l1 == (0, 1) d = Direction("left") - l1 = d.move_forward((0,0)) - assert l1 == (-1,0) - l2 = d.move_forward((1,0)) - assert l2 == (0,0) + l1 = d.move_forward((0, 0)) + assert l1 == (-1, 0) + l2 = d.move_forward((1, 0)) + assert l2 == (0, 0) + def test_add(): d = Direction(Direction.U) l1 = d + "right" @@ -36,5 +38,4 @@ def test_add(): l1 = d + Direction.R l2 = d + Direction.L assert l1.direction == Direction.U - assert l2.direction == Direction.D #fixed - + assert l2.direction == Direction.D # fixed From 1581f7a72b3f91267e5a87fcfffa0f07d0140beb Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 17:32:01 +0530 Subject: [PATCH 19/69] Update test_agents.py --- tests/test_agents.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_agents.py b/tests/test_agents.py index 7d251f547..aece69d7f 100644 --- a/tests/test_agents.py +++ b/tests/test_agents.py @@ -17,7 +17,6 @@ def test_move_forward(): l2 = d.move_forward((1, 0)) assert l2 == (0, 0) - def test_add(): d = Direction(Direction.U) l1 = d + "right" @@ -38,4 +37,4 @@ def test_add(): l1 = d + Direction.R l2 = d + Direction.L assert l1.direction == Direction.U - assert l2.direction == Direction.D # fixed + assert l2.direction == Direction.D From 7f9d0534f52faa3f137c5a14f3ed45a75080bf52 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 17:34:40 +0530 Subject: [PATCH 20/69] Update test_agents.py --- tests/test_agents.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_agents.py b/tests/test_agents.py index aece69d7f..20aa33af6 100644 --- a/tests/test_agents.py +++ b/tests/test_agents.py @@ -16,7 +16,8 @@ def test_move_forward(): assert l1 == (-1, 0) l2 = d.move_forward((1, 0)) assert l2 == (0, 0) - + + def test_add(): d = Direction(Direction.U) l1 = d + "right" @@ -37,4 +38,4 @@ def test_add(): l1 = d + Direction.R l2 = d + Direction.L assert l1.direction == Direction.U - assert l2.direction == Direction.D + assert l2.direction == Direction.D From 594736d3cb27954e496f3f171fcb41ade76078ca Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 17:38:02 +0530 Subject: [PATCH 21/69] Update test_agents.py --- tests/test_agents.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_agents.py b/tests/test_agents.py index 20aa33af6..2512ccddf 100644 --- a/tests/test_agents.py +++ b/tests/test_agents.py @@ -16,8 +16,8 @@ def test_move_forward(): assert l1 == (-1, 0) l2 = d.move_forward((1, 0)) assert l2 == (0, 0) - - + + def test_add(): d = Direction(Direction.U) l1 = d + "right" From b6f9de464bda1d5bf2ef5c5a16f4da59f9881805 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 17:41:23 +0530 Subject: [PATCH 22/69] Update test_text.py added missing whitespace after comma --- tests/test_text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_text.py b/tests/test_text.py index d58cd497a..577ad661b 100644 --- a/tests/test_text.py +++ b/tests/test_text.py @@ -54,7 +54,7 @@ def test_viterbi_segmentation(): P = UnigramTextModel(wordseq) text = "itiseasytoreadwordswithoutspaces" - s, p = viterbi_segment(text,P) + s, p = viterbi_segment(text, P) assert s == [ 'it', 'is', 'easy', 'to', 'read', 'words', 'without', 'spaces'] From 7d5dcba1de45cd511e85e44ce197eccf2f717c31 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 17:48:32 +0530 Subject: [PATCH 23/69] Update utils.py added space after comma --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index cfdc88d37..73dd63d63 100644 --- a/utils.py +++ b/utils.py @@ -194,7 +194,7 @@ def probability(p): return p > random.uniform(0.0, 1.0) -def weighted_sample_with_replacement(n,seq, weights): +def weighted_sample_with_replacement(n, seq, weights): """Pick n samples from seq at random, with replacement, with the probability of each element in proportion to its corresponding weight.""" From 2783b6a981a4cef8c7f653fe16f4a82092393e82 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 17:49:12 +0530 Subject: [PATCH 24/69] Update search.py added space after comma --- search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search.py b/search.py index c8885a9ed..94f4949d2 100644 --- a/search.py +++ b/search.py @@ -587,7 +587,7 @@ def genetic_algorithm(population, fitness_fn, ngen=1000, pmut=0.1): new_population = [] for i in range(len(population)): fitnesses = map(fitness_fn, population) - p1, p2 = weighted_sample_with_replacement(2,population, fitnesses) + p1, p2 = weighted_sample_with_replacement(2, population, fitnesses) child = p1.mate(p2) if random.uniform(0, 1) < pmut: child.mutate() From 99cbbaf72c3be44c84ed5e0b4a5958934bbb55e6 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 17:49:35 +0530 Subject: [PATCH 25/69] Update probability.py added space after comma --- probability.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/probability.py b/probability.py index fa856c330..1d7992e6d 100644 --- a/probability.py +++ b/probability.py @@ -643,5 +643,5 @@ def particle_filtering(e, N, HMM): w[i] = float("{0:.4f}".format(w[i])) # STEP 2 - s = weighted_sample_with_replacement(N,s,w) + s = weighted_sample_with_replacement(N, s, w) return s From 620cb4182fed8b4fb4af005a69d0e8b6607deb41 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 17:50:29 +0530 Subject: [PATCH 26/69] Update learning.py added space after comma --- learning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learning.py b/learning.py index 4917a2cf0..2b86ff8e4 100644 --- a/learning.py +++ b/learning.py @@ -754,7 +754,7 @@ def weighted_replicate(seq, weights, n): wholes = [int(w * n) for w in weights] fractions = [(w * n) % 1 for w in weights] return (flatten([x] * nx for x, nx in zip(seq, wholes)) + - weighted_sample_with_replacement(n - sum(wholes),seq, fractions, )) + weighted_sample_with_replacement(n - sum(wholes), seq, fractions)) def flatten(seqs): return sum(seqs, []) From ab26cd8971b4eaa9cd37dc11781be9507ab62972 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sat, 18 Mar 2017 17:52:40 +0530 Subject: [PATCH 27/69] Update planning.py added double_tennis_problem --- planning.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/planning.py b/planning.py index a17677460..17028e4c6 100644 --- a/planning.py +++ b/planning.py @@ -526,3 +526,34 @@ def spare_tire_graphplan(): graphplan.graph.expand_graph() if len(graphplan.graph.levels)>=2 and graphplan.check_leveloff(): return None + +def double_tennis_problem(): + init = [expr('At(A, LeftBaseLine)'), + expr('At(B, RightNet)'), + expr('Approaching(Ball, RightBaseLine)'), + expr('Partner(A,B)'), + expr('Partner(A,B)')] + + def goal_test(kb): + required = [expr('Goal(Returned(Ball))'), expr('At(a, RightNet)'), expr('At(a, LeftNet)')] + for q in required: + if kb.ask(q) is False: + return False + return True + + ##actions + #hit + precond_pos=[expr("Approaching(Ball,loc)"), expr("At(actor,loc)")] + precond_neg=[] + effect_add=[expr("Returned(Ball)")] + effect_rem = [] + hit = Action(expr("Hit(actor,Ball)"), [precond_pos, precond_neg], [effect_add, effect_rem]) + + #go + precond_pos = [ expr("At(actor,loc)")] + precond_neg = [] + effect_add = [expr("At(actor,to)")] + effect_rem = [expr("At(actor,loc)")] + go = Action(expr("Go(actor,to)"), [precond_pos, precond_neg], [effect_add, effect_rem]) + + return PDLL(init, [hit, go], goal_test) From f69e7c1e7ab1689da33766ae856fb7f55b2ee8ad Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 19 Mar 2017 12:43:08 +0530 Subject: [PATCH 28/69] Update rl.py In the pseudocode figure 21.8, the first 'if' starts with argument 's', which is the previous state, not s1(i.e, the current state). --- rl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rl.py b/rl.py index 5241710fe..77a04f98a 100644 --- a/rl.py +++ b/rl.py @@ -154,13 +154,13 @@ def __call__(self, percept): s1, r1 = self.update_state(percept) Q, Nsa, s, a, r = self.Q, self.Nsa, self.s, self.a, self.r alpha, gamma, terminals, actions_in_state = self.alpha, self.gamma, self.terminals, self.actions_in_state - if s1 in terminals: - Q[s1, None] = r1 + if s in terminals: + Q[s, None] = r1 if s is not None: Nsa[s, a] += 1 Q[s, a] += alpha(Nsa[s, a]) * (r + gamma * max(Q[s1, a1] for a1 in actions_in_state(s1)) - Q[s, a]) - if s1 in terminals: + if s in terminals: self.s = self.a = self.r = None else: self.s, self.r = s1, r1 From fce259abe690e0fd7380b1490c3502dfefacf440 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 19 Mar 2017 15:05:45 +0530 Subject: [PATCH 29/69] Update search.py the 'uniform_cost_search' in notebook 'search-4e.ipynb' resembles more to the pseudocode in book. --- search.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/search.py b/search.py index 94f4949d2..416855008 100644 --- a/search.py +++ b/search.py @@ -268,9 +268,22 @@ def best_first_graph_search(problem, f): return None -def uniform_cost_search(problem): - "[Figure 3.14]" - return best_first_graph_search(problem, lambda node: node.path_cost) +def uniform_cost_search(problem, costfn=lambda node: node.path_cost): + """[Figure 3.14]""" + frontier = FrontierPQ(Node(problem.initial), costfn) + explored = set() + while frontier: + node = frontier.pop() + if problem.is_goal(node.state): + return node + explored.add(node.state) + for action in problem.actions(node.state): + child = node.child(problem, action) + if child.state not in explored and child not in frontier: + frontier.add(child) + elif child in frontier and frontier.cost[child] < child.path_cost: + frontier.replace(child) + return None def depth_limited_search(problem, limit=50): From 6b82783aebe359b43e11119f942b1ff3ecb38f79 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 19 Mar 2017 15:17:16 +0530 Subject: [PATCH 30/69] Update search.py --- search.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/search.py b/search.py index 416855008..342daf13a 100644 --- a/search.py +++ b/search.py @@ -268,9 +268,10 @@ def best_first_graph_search(problem, f): return None -def uniform_cost_search(problem, costfn=lambda node: node.path_cost): - """[Figure 3.14]""" - frontier = FrontierPQ(Node(problem.initial), costfn) +def uniform_cost_search(problem, costfn = lambda node: node.path_cost): + "[Figure 3.14]" + node = Node(problem.initial) + frontier = PriorityQueue(node, costfn) explored = set() while frontier: node = frontier.pop() From 5e628be627aaec90265c66b6c95120532033ecf9 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 19 Mar 2017 15:24:37 +0530 Subject: [PATCH 31/69] Update search.py --- search.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/search.py b/search.py index 342daf13a..44d6961be 100644 --- a/search.py +++ b/search.py @@ -268,23 +268,9 @@ def best_first_graph_search(problem, f): return None -def uniform_cost_search(problem, costfn = lambda node: node.path_cost): +def uniform_cost_search(problem): "[Figure 3.14]" - node = Node(problem.initial) - frontier = PriorityQueue(node, costfn) - explored = set() - while frontier: - node = frontier.pop() - if problem.is_goal(node.state): - return node - explored.add(node.state) - for action in problem.actions(node.state): - child = node.child(problem, action) - if child.state not in explored and child not in frontier: - frontier.add(child) - elif child in frontier and frontier.cost[child] < child.path_cost: - frontier.replace(child) - return None +return best_first_graph_search(problem, lambda node: node.path_cost) def depth_limited_search(problem, limit=50): From 86f10d5eefacc6d8261a16fe144927b5fb6d3194 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 19 Mar 2017 15:28:04 +0530 Subject: [PATCH 32/69] Update search.py --- search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search.py b/search.py index 44d6961be..94f4949d2 100644 --- a/search.py +++ b/search.py @@ -270,7 +270,7 @@ def best_first_graph_search(problem, f): def uniform_cost_search(problem): "[Figure 3.14]" -return best_first_graph_search(problem, lambda node: node.path_cost) + return best_first_graph_search(problem, lambda node: node.path_cost) def depth_limited_search(problem, limit=50): From 1bd46b96024f492afbb9f99c61684ad084de687b Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Thu, 23 Mar 2017 17:26:36 +0530 Subject: [PATCH 33/69] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 08e5e23fd..d1e972197 100644 --- a/README.md +++ b/README.md @@ -76,16 +76,16 @@ Here is a table of algorithms, the figure, name of the code in the book and in t | 9.3 | FOL-FC-Ask | `fol_fc_ask` | [`logic.py`][logic] | | 9.6 | FOL-BC-Ask | `fol_bc_ask` | [`logic.py`][logic] | | 9.8 | Append | | | -| 10.1 | Air-Cargo-problem | | -| 10.2 | Spare-Tire-Problem | | -| 10.3 | Three-Block-Tower | | -| 10.7 | Cake-Problem | | +| 10.1 | Air-Cargo-problem |air_cargo |[planning.py][planning]| +| 10.2 | Spare-Tire-Problem | spare_tire |[planning.py][planning]| +| 10.3 | Three-Block-Tower | three_block_tower |[planning.py][planning]| +| 10.7 | Cake-Problem | have_cake_and_eat_cake_too |[planning.py][planning]| | 10.9 | Graphplan | | | 10.13 | Partial-Order-Planner | | | 11.1 | Job-Shop-Problem-With-Resources | | | 11.5 | Hierarchical-Search | | | 11.8 | Angelic-Search | | -| 11.10 | Doubles-tennis | | +| 11.10 | Doubles-tennis | double_tennis_problem |[planning.py][planning]| | 13 | Discrete Probability Distribution | `ProbDist` | [`probability.py`][probability] | | 13.1 | DT-Agent | `DTAgent` | [`probability.py`][probability] | | 14.9 | Enumeration-Ask | `enumeration_ask` | [`probability.py`][probability] | From 6e3fb8eaed5d0d1d8619b429e58fbb57a2833c6e Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Thu, 23 Mar 2017 17:28:56 +0530 Subject: [PATCH 34/69] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d1e972197..7001c3b95 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ Here is a table of algorithms, the figure, name of the code in the book and in t | 10.2 | Spare-Tire-Problem | spare_tire |[planning.py][planning]| | 10.3 | Three-Block-Tower | three_block_tower |[planning.py][planning]| | 10.7 | Cake-Problem | have_cake_and_eat_cake_too |[planning.py][planning]| -| 10.9 | Graphplan | | +| 10.9 | Graphplan | GraphPlan |[planning.py][planning]| | 10.13 | Partial-Order-Planner | | | 11.1 | Job-Shop-Problem-With-Resources | | | 11.5 | Hierarchical-Search | | From 3f3ef6dc47233ccede6fa309a715cbd65e9b6104 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Thu, 23 Mar 2017 17:30:29 +0530 Subject: [PATCH 35/69] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7001c3b95..7cb796b02 100644 --- a/README.md +++ b/README.md @@ -76,16 +76,16 @@ Here is a table of algorithms, the figure, name of the code in the book and in t | 9.3 | FOL-FC-Ask | `fol_fc_ask` | [`logic.py`][logic] | | 9.6 | FOL-BC-Ask | `fol_bc_ask` | [`logic.py`][logic] | | 9.8 | Append | | | -| 10.1 | Air-Cargo-problem |air_cargo |[planning.py][planning]| -| 10.2 | Spare-Tire-Problem | spare_tire |[planning.py][planning]| -| 10.3 | Three-Block-Tower | three_block_tower |[planning.py][planning]| -| 10.7 | Cake-Problem | have_cake_and_eat_cake_too |[planning.py][planning]| -| 10.9 | Graphplan | GraphPlan |[planning.py][planning]| +| 10.1 | Air-Cargo-problem |`air_cargo` |[`planning.py`][planning]| +| 10.2 | Spare-Tire-Problem | `spare_tire` |[`planning.py`][planning]| +| 10.3 | Three-Block-Tower | `three_block_tower` |[`planning.py`][planning]| +| 10.7 | Cake-Problem | `have_cake_and_eat_cake_too` |[`planning.py`][planning]| +| 10.9 | Graphplan | `GraphPlan` |[`planning.py`][planning]| | 10.13 | Partial-Order-Planner | | | 11.1 | Job-Shop-Problem-With-Resources | | | 11.5 | Hierarchical-Search | | | 11.8 | Angelic-Search | | -| 11.10 | Doubles-tennis | double_tennis_problem |[planning.py][planning]| +| 11.10 | Doubles-tennis | `double_tennis_problem` |[`planning.py`][planning]| | 13 | Discrete Probability Distribution | `ProbDist` | [`probability.py`][probability] | | 13.1 | DT-Agent | `DTAgent` | [`probability.py`][probability] | | 14.9 | Enumeration-Ask | `enumeration_ask` | [`probability.py`][probability] | From 8f0899a0dcf1c367456a7b2e68ed9ade10654156 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Thu, 23 Mar 2017 19:05:46 +0530 Subject: [PATCH 36/69] Update planning.py --- planning.py | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/planning.py b/planning.py index e31b82f13..6f436fdb8 100644 --- a/planning.py +++ b/planning.py @@ -237,36 +237,6 @@ def goal_test(kb): return PDLL(init, [eat_cake, bake_cake], goal_test) -def double_tennis_problem(): - init = [expr('At(A, LeftBaseLine)'), - expr('At(B, RightNet)'), - expr('Approaching(Ball, RightBaseLine)'), - expr('Partner(A,B)'), - expr('Partner(A,B)')] - - def goal_test(kb): - required = [expr('Goal(Returned(Ball))'), expr('At(a, RightNet)'), expr('At(a, LeftNet)')] - for q in required: - if kb.ask(q) is False: - return False - return True - - ##actions - #hit - precond_pos=[expr("Approaching(Ball,loc)"), expr("At(actor,loc)")] - precond_neg=[] - effect_add=[expr("Returned(Ball)")] - effect_rem = [] - hit = Action(expr("Hit(actor,Ball)"), [precond_pos, precond_neg], [effect_add, effect_rem]) - - #go - precond_pos = [ expr("At(actor,loc)")] - precond_neg = [] - effect_add = [expr("At(actor,to)")] - effect_rem = [expr("At(actor,loc)")] - go = Action(expr("Go(actor,to)"), [precond_pos, precond_neg], [effect_add, effect_rem]) - - return PDLL(init, [hit, go], goal_test) class Level(): """ From 0ed9512ba03d0732bd9e39d60ce4cd01871e7632 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Thu, 23 Mar 2017 19:32:05 +0530 Subject: [PATCH 37/69] Update planning.py added spaces after comma --- planning.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/planning.py b/planning.py index 6f436fdb8..90e4151bc 100644 --- a/planning.py +++ b/planning.py @@ -532,8 +532,8 @@ def double_tennis_problem(): init = [expr('At(A, LeftBaseLine)'), expr('At(B, RightNet)'), expr('Approaching(Ball, RightBaseLine)'), - expr('Partner(A,B)'), - expr('Partner(A,B)')] + expr('Partner(A, B)'), + expr('Partner(B, A)')] def goal_test(kb): required = [expr('Goal(Returned(Ball))'), expr('At(a, RightNet)'), expr('At(a, LeftNet)')] @@ -544,17 +544,17 @@ def goal_test(kb): ##actions #hit - precond_pos=[expr("Approaching(Ball,loc)"), expr("At(actor,loc)")] + precond_pos=[expr("Approaching(Ball, loc)"), expr("At(actor, loc)")] precond_neg=[] effect_add=[expr("Returned(Ball)")] effect_rem = [] - hit = Action(expr("Hit(actor,Ball)"), [precond_pos, precond_neg], [effect_add, effect_rem]) + hit = Action(expr("Hit(actor, Ball)"), [precond_pos, precond_neg], [effect_add, effect_rem]) #go - precond_pos = [ expr("At(actor,loc)")] + precond_pos = [ expr("At(actor, loc)")] precond_neg = [] - effect_add = [expr("At(actor,to)")] - effect_rem = [expr("At(actor,loc)")] - go = Action(expr("Go(actor,to)"), [precond_pos, precond_neg], [effect_add, effect_rem]) + effect_add = [expr("At(actor, to)")] + effect_rem = [expr("At(actor, loc)")] + go = Action(expr("Go(actor, to)"), [precond_pos, precond_neg], [effect_add, effect_rem]) return PDLL(init, [hit, go], goal_test) From 8845d4ba647a5af7eebb24847305d7f9ea057d15 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Thu, 23 Mar 2017 19:36:00 +0530 Subject: [PATCH 38/69] Update planning.py --- planning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planning.py b/planning.py index 90e4151bc..47eae77da 100644 --- a/planning.py +++ b/planning.py @@ -551,7 +551,7 @@ def goal_test(kb): hit = Action(expr("Hit(actor, Ball)"), [precond_pos, precond_neg], [effect_add, effect_rem]) #go - precond_pos = [ expr("At(actor, loc)")] + precond_pos = [expr("At(actor, loc)")] precond_neg = [] effect_add = [expr("At(actor, to)")] effect_rem = [expr("At(actor, loc)")] From da4733f135d204fd9f5d9310576e0474e289766e Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Thu, 23 Mar 2017 19:52:52 +0530 Subject: [PATCH 39/69] Update test_planning.py added double_tennis_problem test --- tests/test_planning.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_planning.py b/tests/test_planning.py index 461cdcdbb..6b01c7ca6 100644 --- a/tests/test_planning.py +++ b/tests/test_planning.py @@ -81,3 +81,16 @@ def test_graph_call(): graph() assert levels_size == len(graph.levels) - 1 + + + + +def test_double_tennis_problem(): + p = double_tennis_problem() + assert p.goal_test() is False + solution = [expr("Go(A, RightBaseLine)"), expr("Hit(A, Ball)")] + + for action in solution: + p.act(action) + + assert p.goal_test() From 32cd0e69a24bea3d22409f8912f24ff060e1c307 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Thu, 23 Mar 2017 19:53:43 +0530 Subject: [PATCH 40/69] Update test_planning.py --- tests/test_planning.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_planning.py b/tests/test_planning.py index 6b01c7ca6..ab6383cf7 100644 --- a/tests/test_planning.py +++ b/tests/test_planning.py @@ -83,12 +83,10 @@ def test_graph_call(): assert levels_size == len(graph.levels) - 1 - - def test_double_tennis_problem(): p = double_tennis_problem() assert p.goal_test() is False - solution = [expr("Go(A, RightBaseLine)"), expr("Hit(A, Ball)")] + solution = [expr('Go(A, RightBaseLine)'), expr('Hit(A, Ball)')] for action in solution: p.act(action) From 7afe3522c2869c8682d4f2386a23c4e831a8c0df Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sat, 25 Mar 2017 10:39:55 +0530 Subject: [PATCH 41/69] Update logic.py added fol_fc_ask from fig 9.3 --- logic.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/logic.py b/logic.py index 9054cdfc7..6ba95850b 100644 --- a/logic.py +++ b/logic.py @@ -842,7 +842,22 @@ def subst(s, x): def fol_fc_ask(KB, alpha): - raise NotImplementedError + """A simple forward-chaining algorithm. [Figure 9.3]""" + while new is not None: + new = [] + for rule in KB: + p, q = parse_definite_clause(standardize_variables(rule)) + for p_ in random.KB.clauses: + if p != p_: + for theta in (subst(theta, p) == subst(theta, p_)): + q_ = subst(theta, q) + if not unify(q_,KB.sentence in KB) or not unify(q_, new): + new.append(q_) + phi = unify(q_,alpha) + if phi is not None: + return phi + KB.tell(new) + return None def standardize_variables(sentence, dic=None): @@ -875,7 +890,8 @@ class FolKB(KB): >>> kb0.retract(expr('Rabbit(Pete)')) >>> kb0.ask(expr('Hates(Mac, x)'))[x] Flopsie - >>> kb0.ask(expr('Wife(Pete, x)')) + >>> kb0.ask(expr('Wife(Pete, x)'))"""A simple backward-chaining algorithm for first-order logic. [Figure 9.6] + KB should be an instance of FolKB, and query an atomic sentence.""" False """ From 00d29b49d0b8f39f7a3d54636863abb523a6e02f Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sat, 25 Mar 2017 10:45:52 +0530 Subject: [PATCH 42/69] Update logic.py --- logic.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/logic.py b/logic.py index 6ba95850b..bd9c92334 100644 --- a/logic.py +++ b/logic.py @@ -890,8 +890,7 @@ class FolKB(KB): >>> kb0.retract(expr('Rabbit(Pete)')) >>> kb0.ask(expr('Hates(Mac, x)'))[x] Flopsie - >>> kb0.ask(expr('Wife(Pete, x)'))"""A simple backward-chaining algorithm for first-order logic. [Figure 9.6] - KB should be an instance of FolKB, and query an atomic sentence.""" + >>> kb0.ask(expr('Wife(Pete, x)')) False """ From b5b1b9170865b6689d1c205b77a6ad79af6bff51 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sat, 25 Mar 2017 10:47:42 +0530 Subject: [PATCH 43/69] Update test_planning.py --- tests/test_planning.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/test_planning.py b/tests/test_planning.py index ab6383cf7..461cdcdbb 100644 --- a/tests/test_planning.py +++ b/tests/test_planning.py @@ -81,14 +81,3 @@ def test_graph_call(): graph() assert levels_size == len(graph.levels) - 1 - - -def test_double_tennis_problem(): - p = double_tennis_problem() - assert p.goal_test() is False - solution = [expr('Go(A, RightBaseLine)'), expr('Hit(A, Ball)')] - - for action in solution: - p.act(action) - - assert p.goal_test() From aad19c832d89115bb5fa8827227f657c2eeeb760 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sun, 26 Mar 2017 12:12:04 +0530 Subject: [PATCH 44/69] Merge remote-tracking branch 'origin/master' # Conflicts: # planning.py --- logic.ipynb | 328 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 322 insertions(+), 6 deletions(-) diff --git a/logic.ipynb b/logic.ipynb index 079f1170b..2c963462f 100644 --- a/logic.ipynb +++ b/logic.ipynb @@ -22,7 +22,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 11, "metadata": { "collapsed": true }, @@ -306,11 +306,11 @@ "|--------------------------|----------------------|-------------------------|---|---|\n", "| Negation | ¬ P | `~P` | `~P` | `Expr('~', P)`\n", "| And | P ∧ Q | `P & Q` | `P & Q` | `Expr('&', P, Q)`\n", - "| Or | P ∨ Q | `P` | `Q`| `P` | `Q` | `Expr('`|`', P, Q)`\n", + "| Or | P ∨ Q | `P` | `Q`| `P` | `Q` | `Expr('`|`', P, Q)\n", "| Inequality (Xor) | P ≠ Q | `P ^ Q` | `P ^ Q` | `Expr('^', P, Q)`\n", "| Implication | P → Q | `P` |`'==>'`| `Q` | `P ==> Q` | `Expr('==>', P, Q)`\n", "| Reverse Implication | Q ← P | `Q` |`'<=='`| `P` |`Q <== P` | `Expr('<==', Q, P)`\n", - "| Equivalence | P ↔ Q | `P` |`'<=>'`| `Q` |`P <=> Q` | `Expr('<=>', P, Q)`\n", + "| Equivalence | P ↔ Q | `P` |`'<=>'`| `Q` |`P ==> Q` | `Expr('==>', P, Q)`\n", "\n", "Here's an example of defining a sentence with an implication arrow:" ] @@ -412,6 +412,7 @@ "\n", "The class `PropKB` can be used to represent a knowledge base of propositional logic sentences.\n", "\n", + "\n", "We see that the class `KB` has four methods, apart from `__init__`. A point to note here: the `ask` method simply calls the `ask_generator` method. Thus, this one has already been implemented and what you'll have to actually implement when you create your own knowledge base class (if you want to, though I doubt you'll ever need to; just use the ones we've created for you), will be the `ask_generator` function and not the `ask` function itself.\n", "\n", "The class `PropKB` now.\n", @@ -421,6 +422,321 @@ "* `retract(self, sentence)` : This function removes all the clauses of the sentence given, from the knowledge base. Like the `tell` function, you don't have to pass clauses to remove them from the knowledge base; any sentence will do fine. The function will take care of converting that sentence to clauses and then remove those." ] }, + { + "cell_type": "heading", + "metadata": {}, + "level": 6, + "source": [ + "The following gives an idea how the python code works in logic.py:" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "KB = PropKB()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "creates an empty knowledge base" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "KB.tell(A & C)\n", + "KB.ask(A) == KB.ask(C) == {}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "adds sentence and checks if KB entails the query." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "KB.ask(E)" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{}" + ] + }, + "execution_count": 42, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "kb.tell(E)\n", + "kb.ask(E)" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "KB.retract(C)\n", + "KB.ask(C)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "removes all clauses of 'C' from the sentence." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The truth table enumeration algorithm from Figure 7.10 codes as follows:" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "def tt_entails(kb, alpha):\n", + " \n", + " assert not variables(alpha)\n", + " return tt_check_all(kb, alpha, prop_symbols(kb & alpha), {})" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Example:" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "tt_entails(expr('P & Q'), expr('Q'))" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "tt_check_all(expr('P & Q'), expr('Q'), prop_symbols(expr('Q')), {})" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{B: True, A: True}\n{Q: True}\n" + ] + } + ], + "source": [ + "print (dpll_satisfiable(expr('A & B')))\n", + "print (dpll_satisfiable(expr('P | Q')))" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{x: 2}\n" + ] + } + ], + "source": [ + "print(unify(x, 2, {}))" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{B: True, C: True, A: True}" + ] + }, + "execution_count": 46, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "WalkSAT([A & B, A & C], 0.5, 100 )" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['Left', 'Left']" + ] + }, + "execution_count": 47, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "transition = {'A': {'Left': 'A', 'Right': 'B'},\n", + " 'B': {'Left': 'A', 'Right': 'C'},\n", + " 'C': {'Left': 'B', 'Right': 'C'}}\n", + "\n", + "SAT_plan('C', transition, 'A', 3)" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 49, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "fol_bc_ask(expr('P & Q'), expr('Q'))" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": {}, + "outputs": [ + { + "ename": "AttributeError", + "evalue": "'Expr' object has no attribute 'clauses'", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mpl_fc_entails\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mexpr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'P & Q'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexpr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'Q'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m/home/ubuntu/PycharmProjects/GSOC_17/sofmonk/aima-python/logic.py\u001b[0m in \u001b[0;36mpl_fc_entails\u001b[0;34m(KB, q)\u001b[0m\n\u001b[1;32m 498\u001b[0m \"\"\"\n\u001b[1;32m 499\u001b[0m count = {c: len(conjuncts(c.args[0]))\n\u001b[0;32m--> 500\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mc\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mKB\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclauses\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 501\u001b[0m if c.op == '==>'}\n\u001b[1;32m 502\u001b[0m \u001b[0minferred\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdefaultdict\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbool\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mAttributeError\u001b[0m: 'Expr' object has no attribute 'clauses'" + ], + "output_type": "error" + } + ], + "source": [ + "pl_fc_entails(expr('P & Q'), expr('Q'))" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -701,16 +1017,16 @@ "language_info": { "codemirror_mode": { "name": "ipython", - "version": 3 + "version": 3.0 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.4.3" + "version": "3.5.1" } }, "nbformat": 4, "nbformat_minor": 0 -} +} \ No newline at end of file From 57215282d96be54fe3d7f2a1acddd2fb9a2404cc Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sun, 26 Mar 2017 12:18:54 +0530 Subject: [PATCH 45/69] Merge remote-tracking branch 'origin/master' # Conflicts: # planning.py --- logic.ipynb | 58 +++++++++++------------------------------------------ 1 file changed, 12 insertions(+), 46 deletions(-) diff --git a/logic.ipynb b/logic.ipynb index 2c963462f..b9bd5142d 100644 --- a/logic.ipynb +++ b/logic.ipynb @@ -22,11 +22,20 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 1, "metadata": { "collapsed": true }, - "outputs": [], + "outputs": [ + { + "ename": "IndentationError", + "evalue": "unindent does not match any outer indentation level (logic.py, line 844)", + "traceback": [ + "\u001b[0;36m File \u001b[0;32m\"/home/ubuntu/PycharmProjects/GSOC_17/sofmonk/aima-python/logic.py\"\u001b[0;36m, line \u001b[0;32m844\u001b[0m\n\u001b[0;31m def fol_fc_ask(KB, alpha):\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mIndentationError\u001b[0m\u001b[0;31m:\u001b[0m unindent does not match any outer indentation level\n" + ], + "output_type": "error" + } + ], "source": [ "from utils import *\n", "from logic import *" @@ -423,9 +432,8 @@ ] }, { - "cell_type": "heading", + "cell_type": "markdown", "metadata": {}, - "level": 6, "source": [ "The following gives an idea how the python code works in logic.py:" ] @@ -695,48 +703,6 @@ "SAT_plan('C', transition, 'A', 3)" ] }, - { - "cell_type": "code", - "execution_count": 49, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 49, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "fol_bc_ask(expr('P & Q'), expr('Q'))" - ] - }, - { - "cell_type": "code", - "execution_count": 52, - "metadata": {}, - "outputs": [ - { - "ename": "AttributeError", - "evalue": "'Expr' object has no attribute 'clauses'", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mpl_fc_entails\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mexpr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'P & Q'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexpr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'Q'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m/home/ubuntu/PycharmProjects/GSOC_17/sofmonk/aima-python/logic.py\u001b[0m in \u001b[0;36mpl_fc_entails\u001b[0;34m(KB, q)\u001b[0m\n\u001b[1;32m 498\u001b[0m \"\"\"\n\u001b[1;32m 499\u001b[0m count = {c: len(conjuncts(c.args[0]))\n\u001b[0;32m--> 500\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mc\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mKB\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclauses\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 501\u001b[0m if c.op == '==>'}\n\u001b[1;32m 502\u001b[0m \u001b[0minferred\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdefaultdict\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbool\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mAttributeError\u001b[0m: 'Expr' object has no attribute 'clauses'" - ], - "output_type": "error" - } - ], - "source": [ - "pl_fc_entails(expr('P & Q'), expr('Q'))" - ] - }, { "cell_type": "markdown", "metadata": {}, From ae9174e86218ccf2b88ad388e0ef9bee275b9ef0 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sun, 26 Mar 2017 12:48:26 +0530 Subject: [PATCH 46/69] Merge remote-tracking branch 'origin/master' # Conflicts: # planning.py --- logic.ipynb | 210 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 128 insertions(+), 82 deletions(-) diff --git a/logic.ipynb b/logic.ipynb index b9bd5142d..de9365428 100644 --- a/logic.ipynb +++ b/logic.ipynb @@ -26,16 +26,7 @@ "metadata": { "collapsed": true }, - "outputs": [ - { - "ename": "IndentationError", - "evalue": "unindent does not match any outer indentation level (logic.py, line 844)", - "traceback": [ - "\u001b[0;36m File \u001b[0;32m\"/home/ubuntu/PycharmProjects/GSOC_17/sofmonk/aima-python/logic.py\"\u001b[0;36m, line \u001b[0;32m844\u001b[0m\n\u001b[0;31m def fol_fc_ask(KB, alpha):\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mIndentationError\u001b[0m\u001b[0;31m:\u001b[0m unindent does not match any outer indentation level\n" - ], - "output_type": "error" - } - ], + "outputs": [], "source": [ "from utils import *\n", "from logic import *" @@ -330,18 +321,7 @@ "metadata": { "collapsed": false }, - "outputs": [ - { - "data": { - "text/plain": [ - "(~(P & Q) ==> (~P | ~Q))" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "~(P & Q) |'==>'| (~P | ~Q)" ] @@ -440,7 +420,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -456,7 +436,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -465,7 +445,7 @@ "True" ] }, - "execution_count": 14, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -491,7 +471,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -500,7 +480,7 @@ "False" ] }, - "execution_count": 15, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -511,7 +491,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -520,19 +500,19 @@ "{}" ] }, - "execution_count": 42, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "kb.tell(E)\n", - "kb.ask(E)" + "KB.tell(E)\n", + "KB.ask(E)" ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -541,7 +521,7 @@ "False" ] }, - "execution_count": 16, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -562,12 +542,15 @@ "cell_type": "markdown", "metadata": {}, "source": [ + "\n", + "\n", + "\n", "The truth table enumeration algorithm from Figure 7.10 codes as follows:" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 20, "metadata": {}, "outputs": [], "source": [ @@ -586,7 +569,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -595,7 +578,7 @@ "True" ] }, - "execution_count": 7, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -604,9 +587,16 @@ "tt_entails(expr('P & Q'), expr('Q'))" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The tt_entail algorithm makes use of the tt_check_all() function, which gives results in the following manner." + ] + }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -615,7 +605,7 @@ "True" ] }, - "execution_count": 27, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -624,53 +614,62 @@ "tt_check_all(expr('P & Q'), expr('Q'), prop_symbols(expr('Q')), {})" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "prop_symbols() is used to give the function argument in the form of symbols." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Example of the DPLL algorithm from Figure 7.17." + ] + }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 23, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{B: True, A: True}\n{Q: True}\n" + "{A: True, B: True}\n{Q: True}\n{Q: False}\n{Q: True}\n" ] } ], "source": [ "print (dpll_satisfiable(expr('A & B')))\n", - "print (dpll_satisfiable(expr('P | Q')))" + "\n", + "print (dpll_satisfiable(expr('P | Q')))\n", + "\n", + "print (dpll_satisfiable(expr('P | ~Q')))\n", + "\n", + "print (dpll_satisfiable(expr('~P | Q')))" ] }, { - "cell_type": "code", - "execution_count": 41, + "cell_type": "markdown", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{x: 2}\n" - ] - } - ], "source": [ - "print(unify(x, 2, {}))" + "Example of the WalkSAT algorithm from Figure 7.18." ] }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 27, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{B: True, C: True, A: True}" + "{C: True, A: True, B: True}" ] }, - "execution_count": 46, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } @@ -679,9 +678,16 @@ "WalkSAT([A & B, A & C], 0.5, 100 )" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Example of the SATplan algorithm from Figure 7.22." + ] + }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 25, "metadata": {}, "outputs": [ { @@ -690,7 +696,7 @@ "['Left', 'Left']" ] }, - "execution_count": 47, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } @@ -703,6 +709,30 @@ "SAT_plan('C', transition, 'A', 3)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The unify() algorithm from Figure 9.1 returns a substitution to make the first 2 arguments identical, and the third argument is the substitution built up so far." + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{x: 2}\n" + ] + } + ], + "source": [ + "print(unify(x, 2, {}))" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -723,7 +753,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "metadata": { "collapsed": false }, @@ -734,7 +764,7 @@ "(P ==> ~Q)" ] }, - "execution_count": 15, + "execution_count": 29, "metadata": {}, "output_type": "execute_result" } @@ -752,7 +782,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "metadata": { "collapsed": false }, @@ -763,7 +793,7 @@ "(P ==> ~Q)" ] }, - "execution_count": 16, + "execution_count": 30, "metadata": {}, "output_type": "execute_result" } @@ -781,7 +811,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "metadata": { "collapsed": false }, @@ -792,7 +822,7 @@ "PartialExpr('==>', P)" ] }, - "execution_count": 17, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } @@ -812,7 +842,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "metadata": { "collapsed": false }, @@ -823,7 +853,7 @@ "(P ==> ~Q)" ] }, - "execution_count": 18, + "execution_count": 32, "metadata": {}, "output_type": "execute_result" } @@ -853,22 +883,11 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "metadata": { "collapsed": false }, - "outputs": [ - { - "data": { - "text/plain": [ - "(~(P & Q) ==> (~P | ~Q))" - ] - }, - "execution_count": 19, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "expr('~(P & Q) ==> (~P | ~Q)')" ] @@ -882,7 +901,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": null, "metadata": { "collapsed": false }, @@ -912,7 +931,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "metadata": { "collapsed": false }, @@ -941,7 +960,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": null, "metadata": { "collapsed": false }, @@ -961,6 +980,33 @@ "(P & Q) |'==>'| (P | Q)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "" + ] + }, { "cell_type": "markdown", "metadata": { From 55eda2fdd001beeba06638e63d5d78c6d9618ef7 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sun, 26 Mar 2017 12:51:34 +0530 Subject: [PATCH 47/69] Merge remote-tracking branch 'origin/master' # Conflicts: # planning.py --- logic.ipynb | 130 ++++++++++++++++++++++------------------------------ 1 file changed, 54 insertions(+), 76 deletions(-) diff --git a/logic.ipynb b/logic.ipynb index de9365428..53956eca0 100644 --- a/logic.ipynb +++ b/logic.ipynb @@ -321,7 +321,18 @@ "metadata": { "collapsed": false }, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "(~(P & Q) ==> (~P | ~Q))" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "~(P & Q) |'==>'| (~P | ~Q)" ] @@ -539,8 +550,9 @@ ] }, { - "cell_type": "markdown", + "cell_type": "heading", "metadata": {}, + "level": 1, "source": [ "\n", "\n", @@ -591,7 +603,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The tt_entail algorithm makes use of the tt_check_all() function, which gives results in the following manner." + "The tt_entail algorithm makes use of the tt_check_all() function, which gives results in the following manner. " ] }, { @@ -622,8 +634,9 @@ ] }, { - "cell_type": "markdown", + "cell_type": "heading", "metadata": {}, + "level": 1, "source": [ "Example of the DPLL algorithm from Figure 7.17." ] @@ -637,7 +650,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "{A: True, B: True}\n{Q: True}\n{Q: False}\n{Q: True}\n" + "{B: True, A: True}\n{P: True}\n{P: True}\n{P: False}\n" ] } ], @@ -652,24 +665,25 @@ ] }, { - "cell_type": "markdown", + "cell_type": "heading", "metadata": {}, + "level": 1, "source": [ "Example of the WalkSAT algorithm from Figure 7.18." ] }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 24, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{C: True, A: True, B: True}" + "{C: True, B: True, A: True}" ] }, - "execution_count": 27, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } @@ -679,8 +693,9 @@ ] }, { - "cell_type": "markdown", + "cell_type": "heading", "metadata": {}, + "level": 1, "source": [ "Example of the SATplan algorithm from Figure 7.22." ] @@ -710,8 +725,9 @@ ] }, { - "cell_type": "markdown", + "cell_type": "heading", "metadata": {}, + "level": 1, "source": [ "The unify() algorithm from Figure 9.1 returns a substitution to make the first 2 arguments identical, and the third argument is the substitution built up so far." ] @@ -753,22 +769,11 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 27, "metadata": { "collapsed": false }, - "outputs": [ - { - "data": { - "text/plain": [ - "(P ==> ~Q)" - ] - }, - "execution_count": 29, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "P |'==>'| ~Q" ] @@ -782,22 +787,11 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 28, "metadata": { "collapsed": false }, - "outputs": [ - { - "data": { - "text/plain": [ - "(P ==> ~Q)" - ] - }, - "execution_count": 30, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "(P | '==>') | ~Q" ] @@ -811,7 +805,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 29, "metadata": { "collapsed": false }, @@ -822,7 +816,7 @@ "PartialExpr('==>', P)" ] }, - "execution_count": 31, + "execution_count": 29, "metadata": {}, "output_type": "execute_result" } @@ -842,7 +836,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 30, "metadata": { "collapsed": false }, @@ -853,7 +847,7 @@ "(P ==> ~Q)" ] }, - "execution_count": 32, + "execution_count": 30, "metadata": {}, "output_type": "execute_result" } @@ -883,11 +877,22 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 31, "metadata": { "collapsed": false }, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "(~(P & Q) ==> (~P | ~Q))" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "expr('~(P & Q) ==> (~P | ~Q)')" ] @@ -901,7 +906,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 32, "metadata": { "collapsed": false }, @@ -912,7 +917,7 @@ "(~(P & Q) ==> (~P | ~Q))" ] }, - "execution_count": 20, + "execution_count": 32, "metadata": {}, "output_type": "execute_result" } @@ -931,7 +936,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 33, "metadata": { "collapsed": false }, @@ -942,7 +947,7 @@ "(((P & Q) ==> P) | Q)" ] }, - "execution_count": 21, + "execution_count": 33, "metadata": {}, "output_type": "execute_result" } @@ -960,7 +965,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 34, "metadata": { "collapsed": false }, @@ -971,7 +976,7 @@ "((P & Q) ==> (P | Q))" ] }, - "execution_count": 22, + "execution_count": 34, "metadata": {}, "output_type": "execute_result" } @@ -980,33 +985,6 @@ "(P & Q) |'==>'| (P | Q)" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "" - ] - }, { "cell_type": "markdown", "metadata": { From 34a53ea4c8a4a41319c618fb61946386c7331317 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sun, 26 Mar 2017 16:52:36 +0530 Subject: [PATCH 48/69] Merge remote-tracking branch 'origin/master' # Conflicts: # planning.py --- planning.ipynb | 508 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 503 insertions(+), 5 deletions(-) diff --git a/planning.ipynb b/planning.ipynb index d5a5eb25d..50d581147 100644 --- a/planning.ipynb +++ b/planning.ipynb @@ -1,5 +1,19 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "PLANNING :Classical Planning from Chapter 10 & Planning & Acting in Real World Chapter 11" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This notebook describes the logic.py module, which covers Chapters 6 (Logical Agents), 7 (First-Order Logic) and 8 (Inference in First-Order Logic) of Artificial Intelligence: A Modern Approach. See the intro notebook for instructions." + ] + }, { "cell_type": "code", "execution_count": null, @@ -8,17 +22,501 @@ }, "outputs": [], "source": [ - "import planning" + "from planning import *\n", + "from utils import expr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The PDDL (Planning Domain Definition Language) allows us to express all actions with one action schema, it consists of following four functions:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "1. init(self, initial_state, actions, goal_test) : the constructor creates a knowledge base with initial state, initialises actions and goal_test_func function with goal_test.\n", + "2. goal_test(self) : initialises goal_test with kb.\n", + "3. act(self, action) : Performs the action given as argument, along with checks preformed on pre-conditions." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Actions are described by a set of action schemas that implicitly define the class Actions:\n", + "Actions consists of a precondition(positive and negative) and effect(positive and negative). It consists of following " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Each problem described in chapter 10 has:\n", + "\t* an initial condition\n", + "\t* a goal\n", + "\t* actions with preconditions and effects\n", + "\t\tthese action are split into _pos (positive conditions) and _neg (negative conditions)\n", + "Each problem thus requires a solution which is satisfied by the initial conditions and solved using actions which meet the preconditions and effects.\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "AIR CARGO PROBLEM\n", + "\n", + "The following code defines the initial state for the problem" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "metadata": {}, + "outputs": [], + "source": [ + "def air_cargo():\n", + " init = [expr('At(C1, SFO)'), \n", + " expr('At(C2, JFK)'),\n", + " expr('At(P1, SFO)'),\n", + " expr('At(P2, JFK)'),\n", + " expr('Cargo(C1)'),\n", + " expr('Cargo(C2)'),\n", + " expr('Plane(P1)'),\n", + " expr('Plane(P2)'),\n", + " expr('Airport(JFK)'),\n", + " expr('Airport(SFO)')]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The following code defines the goal_test() function which tests if the solution achieves goal or not. 'required' states the goal:" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "metadata": {}, + "outputs": [], + "source": [ + "def goal_test(kb):\n", + " required = [expr('At(C1 , JFK)'), expr('At(C2 ,SFO)')]\n", + " for q in required:\n", + " if kb.ask(q) is False:\n", + " return False\n", + " return True" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Actions such as 'load', 'unload' and fly are deifned with preconditions and effects accompanying them." + ] + }, + { + "cell_type": "code", + "execution_count": 72, + "metadata": {}, + "outputs": [], + "source": [ + "# Actions\n", + "\n", + "# Load\n", + "precond_pos = [expr(\"At(c, a)\"), expr(\"At(p, a)\"), expr(\"Cargo(c)\"), expr(\"Plane(p)\"),\n", + " expr(\"Airport(a)\")]\n", + "precond_neg = []\n", + "effect_add = [expr(\"In(c, p)\")]\n", + "effect_rem = [expr(\"At(c, a)\")]\n", + "load = Action(expr(\"Load(c, p, a)\"), [precond_pos, precond_neg], [effect_add, effect_rem])\n", + "\n", + "# Unload\n", + "precond_pos = [expr(\"In(c, p)\"), expr(\"At(p, a)\"), expr(\"Cargo(c)\"), expr(\"Plane(p)\"),\n", + " expr(\"Airport(a)\")]\n", + "precond_neg = []\n", + "effect_add = [expr(\"At(c, a)\")]\n", + "effect_rem = [expr(\"In(c, p)\")]\n", + "unload = Action(expr(\"Unload(c, p, a)\"), [precond_pos, precond_neg], [effect_add, effect_rem])\n", + "\n", + "# Fly\n", + "# Used 'f' instead of 'from' because 'from' is a python keyword and expr uses eval() function\n", + "precond_pos = [expr(\"At(p, f)\"), expr(\"Plane(p)\"), expr(\"Airport(f)\"), expr(\"Airport(to)\")]\n", + "precond_neg = []\n", + "effect_add = [expr(\"At(p, to)\")]\n", + "effect_rem = [expr(\"At(p, f)\")]\n", + "fly = Action(expr(\"Fly(p, f, to)\"), [precond_pos, precond_neg], [effect_add, effect_rem])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finally, the function returns the defined problem using PDLL." + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "'return' outside function (, line 1)", + "traceback": [ + "\u001b[0;36m File \u001b[0;32m\"\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m return PDLL(init, [load, unload, fly], goal_test)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m 'return' outside function\n" + ], + "output_type": "error" + } + ], + "source": [ + "return PDLL(init, [load, unload, fly], goal_test)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "A solution to the air_cargo problem is as follows:" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": {}, + "outputs": [], + "source": [ + "solution = [expr(\"Load(C1 , P1, SFO)\"),\n", + " expr(\"Fly(P1, SFO, JFK)\"),\n", + " expr(\"Unload(C1, P1, JFK)\"),\n", + " expr(\"Load(C2, P2, JFK)\"),\n", + " expr(\"Fly(P2, JFK, SFO)\"),\n", + " expr(\"Unload (C2, P2, SFO)\")]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We then execute the action on the state's kb." + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": {}, + "outputs": [], + "source": [ + "a = air_cargo()\n", + "\n", + "for action in solution:\n", + " a.act(action)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now we test whether the actions achieve the goal defined before." + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 66, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "a.goal_test()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Yes, the solution is correct. You may try any other solution to check if it achieves the goal or not." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "" + ] + }, + { + "cell_type": "heading", + "metadata": {}, + "level": 1, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "SPARE TIRE PROBLEM from Figure 10.2:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "init = [expr('Tire(Flat)'),\n", + " expr('Tire(Spare)'),\n", + " expr('At(Flat, Axle)'),\n", + " expr('At(Spare, Trunk)')]\n", + "\n", + "\n", + "required = [expr('At(Spare, Axle)'), expr('At(Flat, Ground)')]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Actions\n", + "\n", + "# Remove\n", + "precond_pos = [expr(\"At(obj, loc)\")]\n", + "precond_neg = []\n", + "effect_add = [expr(\"At(obj, Ground)\")]\n", + "effect_rem = [expr(\"At(obj, loc)\")]\n", + "remove = Action(expr(\"Remove(obj, loc)\"), [precond_pos, precond_neg], [effect_add, effect_rem])\n", + "\n", + "# PutOn\n", + "precond_pos = [expr(\"Tire(t)\"), expr(\"At(t, Ground)\")]\n", + "precond_neg = [expr(\"At(Flat, Axle)\")]\n", + "effect_add = [expr(\"At(t, Axle)\")]\n", + "effect_rem = [expr(\"At(t, Ground)\")]\n", + "put_on = Action(expr(\"PutOn(t, Axle)\"), [precond_pos, precond_neg], [effect_add, effect_rem])\n", + "\n", + "# LeaveOvernight\n", + "precond_pos = []\n", + "precond_neg = []\n", + "effect_add = []\n", + "effect_rem = [expr(\"At(Spare, Ground)\"), expr(\"At(Spare, Axle)\"), expr(\"At(Spare, Trunk)\"),\n", + " expr(\"At(Flat, Ground)\"), expr(\"At(Flat, Axle)\"), expr(\"At(Flat, Trunk)\")]\n", + "leave_overnight = Action(expr(\"LeaveOvernight\"), [precond_pos, precond_neg],\n", + " [effect_add, effect_rem])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "THE BLOCKS WORLD from Figure 10.3 :\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "One solution to the spare tire problem i as follows:" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "metadata": {}, + "outputs": [], + "source": [ + "solution = [expr(\"Remove(Flat, Axle)\"),\n", + " expr(\"Remove(Spare, Trunk)\"),\n", + " expr(\"PutOn(Spare, Axle)\")]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "lets test it in the same way as before :" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 76, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "s = spare_tire()\n", + "\n", + "for action in solution:\n", + " s.act(action)\n", + "\n", + "s.goal_test()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The solution achieves the goal." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "" ] }, { "cell_type": "code", "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "THE BLOCKS WORLD from Figure 10.3 :\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "image for solution" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "metadata": {}, + "outputs": [], + "source": [ + "" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", "metadata": { "collapsed": true }, - "outputs": [], - "source": [] + "source": [ + "" + ] + }, + { + "cell_type": "heading", + "metadata": {}, + "level": 1, + "source": [ + "" + ] } ], "metadata": { @@ -30,7 +528,7 @@ "language_info": { "codemirror_mode": { "name": "ipython", - "version": 3 + "version": 3.0 }, "file_extension": ".py", "mimetype": "text/x-python", @@ -42,4 +540,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} +} \ No newline at end of file From 847edaee5ea1f88a959f99c4f76501f1fb046b4f Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sun, 26 Mar 2017 17:20:02 +0530 Subject: [PATCH 49/69] Merge remote-tracking branch 'origin/master' # Conflicts: # planning.py --- planning.ipynb | 105 ++++++++----------------------------------------- 1 file changed, 16 insertions(+), 89 deletions(-) diff --git a/planning.ipynb b/planning.ipynb index 50d581147..961f8068d 100644 --- a/planning.ipynb +++ b/planning.ipynb @@ -16,7 +16,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": { "collapsed": false }, @@ -81,7 +81,7 @@ }, { "cell_type": "code", - "execution_count": 70, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -107,7 +107,7 @@ }, { "cell_type": "code", - "execution_count": 71, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -128,7 +128,7 @@ }, { "cell_type": "code", - "execution_count": 72, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -167,21 +167,10 @@ ] }, { - "cell_type": "code", - "execution_count": 73, + "cell_type": "markdown", "metadata": {}, - "outputs": [ - { - "ename": "SyntaxError", - "evalue": "'return' outside function (, line 1)", - "traceback": [ - "\u001b[0;36m File \u001b[0;32m\"\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m return PDLL(init, [load, unload, fly], goal_test)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m 'return' outside function\n" - ], - "output_type": "error" - } - ], "source": [ - "return PDLL(init, [load, unload, fly], goal_test)" + " return PDLL(init, [load, unload, fly], goal_test)" ] }, { @@ -207,7 +196,7 @@ }, { "cell_type": "code", - "execution_count": 63, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -228,7 +217,7 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -247,7 +236,7 @@ }, { "cell_type": "code", - "execution_count": 66, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -256,7 +245,7 @@ "True" ] }, - "execution_count": 66, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -279,21 +268,6 @@ "" ] }, - { - "cell_type": "heading", - "metadata": {}, - "level": 1, - "source": [ - "" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -310,7 +284,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -325,7 +299,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -371,7 +345,7 @@ }, { "cell_type": "code", - "execution_count": 75, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -389,7 +363,7 @@ }, { "cell_type": "code", - "execution_count": 76, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -398,7 +372,7 @@ "True" ] }, - "execution_count": 76, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -426,24 +400,6 @@ "" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -452,41 +408,12 @@ ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ "image for solution" ] }, - { - "cell_type": "code", - "execution_count": 77, - "metadata": {}, - "outputs": [], - "source": [ - "" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "" - ] - }, { "cell_type": "markdown", "metadata": {}, From 6228232218e56da111bbbc097782d9d3dc8c71e7 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 26 Mar 2017 17:25:59 +0530 Subject: [PATCH 50/69] Update planning.ipynb --- planning.ipynb | 46 ++++++++-------------------------------------- 1 file changed, 8 insertions(+), 38 deletions(-) diff --git a/planning.ipynb b/planning.ipynb index 961f8068d..804ae99d4 100644 --- a/planning.ipynb +++ b/planning.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "PLANNING :Classical Planning from Chapter 10 & Planning & Acting in Real World Chapter 11" + "## PLANNING :Classical Planning from Chapter 10 & Planning & Acting in Real World Chapter 11" ] }, { @@ -30,7 +30,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The PDDL (Planning Domain Definition Language) allows us to express all actions with one action schema, it consists of following four functions:" + "# The PDDL (Planning Domain Definition Language) \n" "\n" " allows us to express all actions with one action schema, it consists of following four functions:" ] }, { @@ -53,7 +53,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Actions are described by a set of action schemas that implicitly define the class Actions:\n", + "# Actions \n""\n""Actions are described by a set of action schemas that implicitly define the class Actions:\n", "Actions consists of a precondition(positive and negative) and effect(positive and negative). It consists of following " ] }, @@ -74,7 +74,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "AIR CARGO PROBLEM\n", + "# AIR CARGO PROBLEM\n", "\n", "The following code defines the initial state for the problem" ] @@ -272,7 +272,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "SPARE TIRE PROBLEM from Figure 10.2:" + "# SPARE TIRE PROBLEM from Figure 10.2:" ] }, { @@ -333,14 +333,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "THE BLOCKS WORLD from Figure 10.3 :\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "One solution to the spare tire problem i as follows:" + "One solution to the spare tire problem from the book is as follows:" ] }, { @@ -404,7 +397,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "THE BLOCKS WORLD from Figure 10.3 :\n" + "# THE BLOCKS WORLD from Figure 10.3 :\n" ] }, { @@ -414,20 +407,6 @@ "image for solution" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "" - ] - }, { "cell_type": "markdown", "metadata": { @@ -437,15 +416,6 @@ "" ] }, - { - "cell_type": "heading", - "metadata": {}, - "level": 1, - "source": [ - "" - ] - } - ], "metadata": { "kernelspec": { "display_name": "Python 3", @@ -467,4 +437,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} \ No newline at end of file +} From f45306e300f6267de06554a3874ffb4be1f7bd6a Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sun, 26 Mar 2017 17:46:40 +0530 Subject: [PATCH 51/69] Merge remote-tracking branch 'origin/master' # Conflicts: # planning.py --- planning.ipynb | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/planning.ipynb b/planning.ipynb index 804ae99d4..d66f28cfa 100644 --- a/planning.ipynb +++ b/planning.ipynb @@ -30,7 +30,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# The PDDL (Planning Domain Definition Language) \n" "\n" " allows us to express all actions with one action schema, it consists of following four functions:" + "#PDDL \n", + "The PDDL (Planning Domain Definition Language) allows us to express all actions with one action schema, it consists of following four functions:" ] }, { @@ -53,7 +54,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Actions \n""\n""Actions are described by a set of action schemas that implicitly define the class Actions:\n", + "#ACTIONS\n", + "Actions are described by a set of action schemas that implicitly define the class Actions:\n", "Actions consists of a precondition(positive and negative) and effect(positive and negative). It consists of following " ] }, @@ -70,6 +72,13 @@ " " ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -275,13 +284,6 @@ "# SPARE TIRE PROBLEM from Figure 10.2:" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "" - ] - }, { "cell_type": "code", "execution_count": 5, @@ -333,7 +335,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "One solution to the spare tire problem from the book is as follows:" + "solution to the spare tire problem from the book is as follows:" ] }, { @@ -351,7 +353,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "lets test it in the same way as before :" + "let's test it in the same way as before :" ] }, { @@ -397,25 +399,17 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# THE BLOCKS WORLD from Figure 10.3 :\n" + "# THE BLOCKS WORLD from Figure 10.3 :" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "image for solution" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "collapsed": true - }, - "source": [ - "" + "" ] - }, + } + ], "metadata": { "kernelspec": { "display_name": "Python 3", @@ -437,4 +431,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} +} \ No newline at end of file From 98fc7150f799a36a8bee3c5fc46f34abfeba158b Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sun, 26 Mar 2017 17:49:22 +0530 Subject: [PATCH 52/69] Merge remote-tracking branch 'origin/master' # Conflicts: # planning.py --- learning.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/learning.ipynb b/learning.ipynb index 9f2d91add..78cdd8403 100644 --- a/learning.ipynb +++ b/learning.ipynb @@ -692,7 +692,7 @@ "cell_type": "code", "execution_count": 13, "metadata": { - "collapsed": false, + "collapsed": true, "deletable": true, "editable": true }, @@ -1042,7 +1042,7 @@ "language_info": { "codemirror_mode": { "name": "ipython", - "version": 3 + "version": 3.0 }, "file_extension": ".py", "mimetype": "text/x-python", @@ -1053,5 +1053,5 @@ } }, "nbformat": 4, - "nbformat_minor": 2 -} + "nbformat_minor": 0 +} \ No newline at end of file From 189f1e680b629b8e1c17bfbdfaf3e7566a832cb9 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 26 Mar 2017 17:51:48 +0530 Subject: [PATCH 53/69] Add files via upload added blocks_world.png --- images/blocks_world.png | Bin 0 -> 57044 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 images/blocks_world.png diff --git a/images/blocks_world.png b/images/blocks_world.png new file mode 100644 index 0000000000000000000000000000000000000000..cc772ae3692e5ea8618012a7eb78adaac1d4141e GIT binary patch literal 57044 zcmd42RahNO*Dcyekl^mVfZ*;Lf(8rj?ry<@ySrP026uPYKyY_=CpdfMeZTMD=Xv(o zH|Oeb!CKv2U2E3t>Y8(mF)QqgoCMN){PzF=AW2DzDgpo$A^<>a!9jx0jEt@P0e?U_ ziAX8K!NDzW%5Q)V@xF?we^s(G{pxDqXabno+S!;eI2k#bnAkd*+kHKU>J$V3Qb0=d zqq1A(NxSD4Ew%K6C!XI+;TB~6aQe+Q`L?Z;@+U|M zHVH?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SUW|QT9fBQvrioB=U&BK(*seymD@tCTY7j@AB;la;ZO)1TVY`UL}-@Qj^ihv zs9W`kvfA|Vzmt?qOiZ={0Ne~{DWb~cf@0&bfWc1-KBNJBL_TrioQpfjBqzaE43Z<$ z>Z-FX;LlTld4~Zxthg>gKFqT{ZjI1dM#n+uI0MO`kxjM3`|{~F(#E^R-`8oa%HBfe zRRe^K0fv9tiWBuf3kZ~gUiQlIUeh!GeMaz6N(^ZtyA1>OX9FocRg*7%0uTHjxFIVV literal 0 HcmV?d00001 From 67ca86daa0704add3915b027832944a1eba52db0 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 26 Mar 2017 17:52:28 +0530 Subject: [PATCH 54/69] Update planning.ipynb --- planning.ipynb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/planning.ipynb b/planning.ipynb index d66f28cfa..dc5882f10 100644 --- a/planning.ipynb +++ b/planning.ipynb @@ -406,7 +406,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "" + "\n", + "![pL plot](images/blocks_world.png)\n" ] } ], @@ -431,4 +432,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} \ No newline at end of file +} From b0f01657161a867d5d77af230fcfaf79ef4df16a Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 26 Mar 2017 17:55:43 +0530 Subject: [PATCH 55/69] Update planning.ipynb --- planning.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planning.ipynb b/planning.ipynb index dc5882f10..b30451419 100644 --- a/planning.ipynb +++ b/planning.ipynb @@ -407,7 +407,7 @@ "metadata": {}, "source": [ "\n", - "![pL plot](images/blocks_world.png)\n" + "![pL plot](images/blocks_world.png)\n""\n"" The above image hows how the transitions between different states can be possible. Watch how the rightmost transition is what we follow in the book." ] } ], From 5535da79095a226e422d18a084ca564677abaede Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 26 Mar 2017 17:56:51 +0530 Subject: [PATCH 56/69] Update planning.ipynb --- planning.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planning.ipynb b/planning.ipynb index b30451419..0811de552 100644 --- a/planning.ipynb +++ b/planning.ipynb @@ -407,7 +407,7 @@ "metadata": {}, "source": [ "\n", - "![pL plot](images/blocks_world.png)\n""\n"" The above image hows how the transitions between different states can be possible. Watch how the rightmost transition is what we follow in the book." + "![pL plot](images/blocks_world.png)\n","\n"," The above image hows how the transitions between different states can be possible. Watch how the rightmost transition is what we follow in the book." ] } ], From 3cd2ad3727c6f37ab5845f3b571d2ebc8a87f507 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 26 Mar 2017 17:59:02 +0530 Subject: [PATCH 57/69] Update planning.ipynb --- planning.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planning.ipynb b/planning.ipynb index 0811de552..80ac36b3a 100644 --- a/planning.ipynb +++ b/planning.ipynb @@ -281,7 +281,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# SPARE TIRE PROBLEM from Figure 10.2:" + "# SPARE TIRE PROBLEM from Figure 10.2:\n","\n","The problem follows the same structure of function as before, only the predicates are changed.\n" ] }, { @@ -407,7 +407,7 @@ "metadata": {}, "source": [ "\n", - "![pL plot](images/blocks_world.png)\n","\n"," The above image hows how the transitions between different states can be possible. Watch how the rightmost transition is what we follow in the book." + "![pL plot](images/blocks_world.png)\n","\n"," The above image shows how the transitions between different states can be possible. Watch how the rightmost transition is what we follow in the book." ] } ], From 3c401e2f8c319b8976384bfdbb2db1106e4b8553 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 26 Mar 2017 17:59:52 +0530 Subject: [PATCH 58/69] Update planning.ipynb --- planning.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planning.ipynb b/planning.ipynb index 80ac36b3a..4740ea7cf 100644 --- a/planning.ipynb +++ b/planning.ipynb @@ -83,7 +83,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# AIR CARGO PROBLEM\n", + "# AIR CARGO PROBLEM from Figure 10.1\n", "\n", "The following code defines the initial state for the problem" ] From 6259ecfe9ba30bd4c97dfdbef63819bdd3436581 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 26 Mar 2017 18:03:12 +0530 Subject: [PATCH 59/69] Update planning.ipynb --- planning.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planning.ipynb b/planning.ipynb index 4740ea7cf..020d7c52e 100644 --- a/planning.ipynb +++ b/planning.ipynb @@ -4,14 +4,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## PLANNING :Classical Planning from Chapter 10 & Planning & Acting in Real World Chapter 11" + "## PLANNING" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "This notebook describes the logic.py module, which covers Chapters 6 (Logical Agents), 7 (First-Order Logic) and 8 (Inference in First-Order Logic) of Artificial Intelligence: A Modern Approach. See the intro notebook for instructions." + "This notebook describes the logic.py module, which covers Classical Planning from Chapter 10 & Planning & Acting in Real World Chapter 11." ] }, { From 45e6447b98e86b4aa604030818f75c55c7b00ec9 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 26 Mar 2017 18:03:45 +0530 Subject: [PATCH 60/69] Update planning.ipynb --- planning.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planning.ipynb b/planning.ipynb index 020d7c52e..93934d163 100644 --- a/planning.ipynb +++ b/planning.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This notebook describes the logic.py module, which covers Classical Planning from Chapter 10 & Planning & Acting in Real World Chapter 11." + "This notebook describes the planning.py module, which covers Classical Planning from Chapter 10 & Planning & Acting in Real World Chapter 11." ] }, { From 3187acb3a34316299a6b6a7a23a61b0572bd2efb Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 26 Mar 2017 18:27:28 +0530 Subject: [PATCH 61/69] Update logic.py updated fol_fc_ask() --- logic.py | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/logic.py b/logic.py index 9eb7fd422..dc1cf64c5 100644 --- a/logic.py +++ b/logic.py @@ -841,28 +841,25 @@ def subst(s, x): return Expr(x.op, *[subst(s, arg) for arg in x.args]) - def fol_fc_ask(KB, alpha): +def fol_fc_ask(KB, alpha): """A simple forward-chaining algorithm. [Figure 9.3]""" - while True: - new = [] - for rule in KB.clauses: - p, q = parse_definite_clause(standardize_variables(rule)) - for p_ in KB.clauses: - if p != p_: - for theta in KB.clauses: - if subst(theta, p) == subst(theta, p_): - q_ = subst(theta, q) - if not unify(q_,KB.sentence in KB) or not unify(q_, new): - new.append(q_) - phi = unify(q_,alpha) - if phi is not None: - return phi - KB.tell(new) - if new is None: - break - return None - -fol_fc_ask(crime_kb, 'Criminal(x)') + while True: + new = [] + for rule in KB.clauses: + p, q = parse_definite_clause(standardize_variables(rule)) + for p_ in KB.clauses: + if p != p_: + for theta in (subst(theta, p) == subst(theta, p_)): + q_ = subst(theta, q) + if not unify(q_,KB.sentence in KB) or not unify(q_, new): + new.append(q_) + phi = unify(q_,alpha) + if phi is not None: + return phi + KB.tell(new) + if new is None: + break + return None def standardize_variables(sentence, dic=None): From c9a007b0de22c555982d0f50cee4a825dc3eec16 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 26 Mar 2017 18:44:54 +0530 Subject: [PATCH 62/69] Update logic.py --- logic.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/logic.py b/logic.py index cccc61184..ff5e6f09b 100644 --- a/logic.py +++ b/logic.py @@ -846,20 +846,20 @@ def subst(s, x): def fol_fc_ask(KB, alpha): - """A simple forward-chaining algorithm. [Figure 9.3]""" + """A simple forward-chaining algorithm. [Figure 9.3]""" while True: new = [] for rule in KB.clauses: p, q = parse_definite_clause(standardize_variables(rule)) for p_ in KB.clauses: if p != p_: - for theta in (subst(theta, p) == subst(theta, p_)): - q_ = subst(theta, q) - if not unify(q_,KB.sentence in KB) or not unify(q_, new): - new.append(q_) - phi = unify(q_,alpha) - if phi is not None: - return phi + for theta in (subst(theta, p) == subst(theta, p_)): + q_ = subst(theta, q) + if not unify(q_,KB.sentence in KB) or not unify(q_, new): + new.append(q_) + phi = unify(q_,alpha) + if phi is not None: + return phi KB.tell(new) if new is None: break From 957fe493e6820446072b9e1a6798f15ffae9e053 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sun, 26 Mar 2017 22:58:12 +0530 Subject: [PATCH 63/69] Merge remote-tracking branch 'origin/master' # Conflicts: # planning.py --- planning.ipynb | 132 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 111 insertions(+), 21 deletions(-) diff --git a/planning.ipynb b/planning.ipynb index 93934d163..e8230e5e2 100644 --- a/planning.ipynb +++ b/planning.ipynb @@ -31,16 +31,25 @@ "metadata": {}, "source": [ "#PDDL \n", - "The PDDL (Planning Domain Definition Language) allows us to express all actions with one action schema, it consists of following four functions:" + "The PDDL (Planning Domain Definition Language) allows us to express all actions with one action schema,\n", + "\n", + "The `PDDL class` include:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "1. init(self, initial_state, actions, goal_test) : the constructor creates a knowledge base with initial state, initialises actions and goal_test_func function with goal_test.\n", - "2. goal_test(self) : initialises goal_test with kb.\n", - "3. act(self, action) : Performs the action given as argument, along with checks preformed on pre-conditions." + "1. `init(self, initial_state, actions, goal_test)`: the constructor creates a knowledge base with initial state, initialises actions and goal_test_func function with goal_test.\n", + "2. `goal_test(self)`: initialises goal_test with kb.\n", + "3. `act(self, action)`: performs the action given as argument, along with checks preformed on pre-conditions." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "PDDL is a domain definition language. It is used to define the properties of a domain, the predicates which are used and the action definition. A predicate defines the property of an object which can be true or false, e.g. yellow t-shirt. Yellow is the property and t-shirt is the object. " ] }, { @@ -64,11 +73,10 @@ "metadata": {}, "source": [ "Each problem described in chapter 10 has:\n", - "\t* an initial condition\n", - "\t* a goal\n", - "\t* actions with preconditions and effects\n", - "\t\tthese action are split into _pos (positive conditions) and _neg (negative conditions)\n", - "Each problem thus requires a solution which is satisfied by the initial conditions and solved using actions which meet the preconditions and effects.\n", + "- an initial state\n", + "- a goal\n", + "- actions with preconditions and effects (these action are split into _pos (positive conditions) and _neg (negative conditions))\n", + "Each problem thus requires a solution which is satisfied by some initial conditions and solved using actions which meet the preconditions and effects.\n", " " ] }, @@ -85,6 +93,10 @@ "source": [ "# AIR CARGO PROBLEM from Figure 10.1\n", "\n", + "To define a problem we have to define a initial (predicates which are true at the beginning of the problem) and a goal state (predicates which are true at\n", + " the end of the problem). \n", + "\n", + "\n", "The following code defines the initial state for the problem" ] }, @@ -107,6 +119,19 @@ " expr('Airport(SFO)')]" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "`init` defines the initial state of the problem.\n", + "\n", + "**`expr('At(C1, SF0)')`** represents the predicate **Cargo 1 at San Fransisco**\n", + "\n", + "**`expr('At(P1, SF0)')`** represents the predicate **Plane 1 at San Fransisco** ... and so on.\n", + "\n", + "\n" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -132,28 +157,36 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Actions such as 'load', 'unload' and fly are deifned with preconditions and effects accompanying them." + "For this problem the Goal is **`(At(C1 , JFK ) ∧ At(C2 , SFO))`** i.e., **Cargo 1 ar JFK and Cargo 2 at San Fransisco** which is written as:\n", + "\n", + "`required = [expr('At(C1 , JFK)'), expr('At(C2 ,SFO)')]`\n", + "\n", + "The function `goal_test(kb)` takes a knowledge base as argument, and for every predicate in `required` (goal), it checks the `ask` function from `KB class`. The `ask` function returns value `True` or `False` accordingly if predicate in `required` meets preconditions or not (defined ahead)." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Actions such as 'load', 'unload' and fly are defined with preconditions and effects accompanying them." ] }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "# Actions\n", - "\n", "# Load\n", - "precond_pos = [expr(\"At(c, a)\"), expr(\"At(p, a)\"), expr(\"Cargo(c)\"), expr(\"Plane(p)\"),\n", - " expr(\"Airport(a)\")]\n", + "precond_pos = [expr(\"At(c, a)\"), expr(\"At(p, a)\"), expr(\"Cargo(c)\"), expr(\"Plane(p)\"), expr(\"Airport(a)\")]\n", "precond_neg = []\n", "effect_add = [expr(\"In(c, p)\")]\n", "effect_rem = [expr(\"At(c, a)\")]\n", "load = Action(expr(\"Load(c, p, a)\"), [precond_pos, precond_neg], [effect_add, effect_rem])\n", "\n", "# Unload\n", - "precond_pos = [expr(\"In(c, p)\"), expr(\"At(p, a)\"), expr(\"Cargo(c)\"), expr(\"Plane(p)\"),\n", - " expr(\"Airport(a)\")]\n", + "precond_pos = [expr(\"In(c, p)\"), expr(\"At(p, a)\"), expr(\"Cargo(c)\"), expr(\"Plane(p)\"), expr(\"Airport(a)\")]\n", "precond_neg = []\n", "effect_add = [expr(\"At(c, a)\")]\n", "effect_rem = [expr(\"In(c, p)\")]\n", @@ -168,6 +201,42 @@ "fly = Action(expr(\"Fly(p, f, to)\"), [precond_pos, precond_neg], [effect_add, effect_rem])" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "`precond_` is used to denote predicates which must be True **before** the action.\n", + "eg: \n", + "\n", + "`effect_` is used to denote predicates which must be True **after** the action.\n", + "\n", + "`precon_pos` & `effect_add` are used to denote predicates which must be **True**.\n", + "\n", + "`precon_neg` & `effect_rem` are used to denote predicates which must be **False**.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Eg: in Action `load`\n", + "\n", + "`precond_pos = [expr(\"At(c, a)\"), expr(\"At(p, a)\"), expr(\"Cargo(c)\"), expr(\"Plane(p)\"), expr(\"Airport(a)\")]` is a precondition which must be **True** denoting predicate _Cargo c at Airport a & Plane p at Airport a_.\n", + "\n", + "`precond_neg = []` is a precondition which must be **False**. \t\t\t\n", + "\n", + "`effect_add = [expr(\"In(c, p)\")]` is an effect which must be **True** denoting the predicate _Cargo c in Plane p_.\n", + "\n", + "`effect_rem = [expr(\"At(c, a)\")]`is an effect which must be **False** denoting the predicate _Cargo c at Airport a_." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "`load = Action(expr(\"Load(c, p, a)\"), [precond_pos, precond_neg], [effect_add, effect_rem])` thus define the action **`Load(c, p, a)** with the preconditions it must follow and the effects it leads to." + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -179,7 +248,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - " return PDLL(init, [load, unload, fly], goal_test)" + "`return(PDLL(init, [load, unload, fly], goal_test)`\n", + "\n", + " which defines the problem as a whole with its initial state (`init`), the actions possible(` [load, unload, fly]`) and the goal(`goal_test`)." ] }, { @@ -217,6 +288,13 @@ " expr(\"Unload (C2, P2, SFO)\")]" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "where `expr(\"Load(C1 , P1, SFO)\")` means _load the Cargo C1 in Plane P1 at San Fransico_. In order for this action to take place the preconditions we specified while defining the action `Load` must be met. The effects from this action are then carried forward i.e., they now are an existing state and it should be sought that these effects do **not** clash with preconditions of actions ahead, otherwise the action can't be completed.\n" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -240,7 +318,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now we test whether the actions achieve the goal defined before." + "where each action is acted upon leading to a state which is tested below to be the goal state or not." ] }, { @@ -281,7 +359,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# SPARE TIRE PROBLEM from Figure 10.2:\n","\n","The problem follows the same structure of function as before, only the predicates are changed.\n" + "# SPARE TIRE PROBLEM from Figure 10.2:\n", + "\n", + "The problem follows the same structure of function as before, only the predicates are changed.\n" ] }, { @@ -406,8 +486,18 @@ "cell_type": "markdown", "metadata": {}, "source": [ + " The above image below shows the transitions between different states which are possible for 3 blocks. Watch how the rightmost transition is what we follow in the book.\n", "\n", - "![pL plot](images/blocks_world.png)\n","\n"," The above image shows how the transitions between different states can be possible. Watch how the rightmost transition is what we follow in the book." + "![pL plot](images/blocks_world.png)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "" ] } ], @@ -432,4 +522,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} +} \ No newline at end of file From 4e4fb038d592be04b6295317905c50e52ab86ca6 Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 26 Mar 2017 23:14:18 +0530 Subject: [PATCH 64/69] Update logic.ipynb --- logic.ipynb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/logic.ipynb b/logic.ipynb index 53956eca0..dec038aaa 100644 --- a/logic.ipynb +++ b/logic.ipynb @@ -550,14 +550,14 @@ ] }, { - "cell_type": "heading", + "cell_type": "markdown", "metadata": {}, "level": 1, "source": [ "\n", "\n", "\n", - "The truth table enumeration algorithm from Figure 7.10 codes as follows:" + "# The truth table enumeration algorithm from Figure 7.10 codes as follows:" ] }, { @@ -634,11 +634,11 @@ ] }, { - "cell_type": "heading", + "cell_type": "markdown", "metadata": {}, "level": 1, "source": [ - "Example of the DPLL algorithm from Figure 7.17." + "# Example of the DPLL algorithm from Figure 7.17." ] }, { @@ -665,11 +665,11 @@ ] }, { - "cell_type": "heading", + "cell_type": "markdown", "metadata": {}, "level": 1, "source": [ - "Example of the WalkSAT algorithm from Figure 7.18." + "#Example of the WalkSAT algorithm from Figure 7.18." ] }, { @@ -693,11 +693,11 @@ ] }, { - "cell_type": "heading", + "cell_type": "markdown", "metadata": {}, "level": 1, "source": [ - "Example of the SATplan algorithm from Figure 7.22." + "#Example of the SATplan algorithm from Figure 7.22." ] }, { @@ -725,11 +725,11 @@ ] }, { - "cell_type": "heading", + "cell_type": "markdown", "metadata": {}, "level": 1, "source": [ - "The unify() algorithm from Figure 9.1 returns a substitution to make the first 2 arguments identical, and the third argument is the substitution built up so far." + "#The unify() algorithm from Figure 9.1\n""\n""Returns a substitution to make the first 2 arguments identical, and the third argument is the substitution built up so far." ] }, { @@ -1019,4 +1019,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} \ No newline at end of file +} From cd10b2c6b8fd0325d2b477518694664c9c79b1ea Mon Sep 17 00:00:00 2001 From: Angira Sharma Date: Sun, 26 Mar 2017 23:18:17 +0530 Subject: [PATCH 65/69] Update logic.ipynb --- logic.ipynb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/logic.ipynb b/logic.ipynb index dec038aaa..e6d3f899d 100644 --- a/logic.ipynb +++ b/logic.ipynb @@ -552,7 +552,6 @@ { "cell_type": "markdown", "metadata": {}, - "level": 1, "source": [ "\n", "\n", @@ -636,7 +635,6 @@ { "cell_type": "markdown", "metadata": {}, - "level": 1, "source": [ "# Example of the DPLL algorithm from Figure 7.17." ] @@ -667,9 +665,8 @@ { "cell_type": "markdown", "metadata": {}, - "level": 1, "source": [ - "#Example of the WalkSAT algorithm from Figure 7.18." + "# Example of the WalkSAT algorithm from Figure 7.18." ] }, { @@ -695,9 +692,8 @@ { "cell_type": "markdown", "metadata": {}, - "level": 1, "source": [ - "#Example of the SATplan algorithm from Figure 7.22." + "# Example of the SATplan algorithm from Figure 7.22." ] }, { @@ -727,9 +723,8 @@ { "cell_type": "markdown", "metadata": {}, - "level": 1, "source": [ - "#The unify() algorithm from Figure 9.1\n""\n""Returns a substitution to make the first 2 arguments identical, and the third argument is the substitution built up so far." + "# The unify() algorithm from Figure 9.1\n""\n""Returns a substitution to make the first 2 arguments identical, and the third argument is the substitution built up so far." ] }, { From 8d40539abab54f8df2f9e8058515ab4b464df4f1 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sun, 26 Mar 2017 23:21:02 +0530 Subject: [PATCH 66/69] Merge remote-tracking branch 'origin/master' # Conflicts: # planning.py --- logic.ipynb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/logic.ipynb b/logic.ipynb index e6d3f899d..57f782332 100644 --- a/logic.ipynb +++ b/logic.ipynb @@ -554,9 +554,7 @@ "metadata": {}, "source": [ "\n", - "\n", - "\n", - "# The truth table enumeration algorithm from Figure 7.10 codes as follows:" + "# The truth table enumeration algorithm from Figure 7.10:" ] }, { @@ -636,7 +634,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Example of the DPLL algorithm from Figure 7.17." + "# Example of the DPLL algorithm from Figure 7.17:" ] }, { @@ -666,7 +664,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Example of the WalkSAT algorithm from Figure 7.18." + "# Example of the WalkSAT algorithm from Figure 7.18:" ] }, { @@ -693,7 +691,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Example of the SATplan algorithm from Figure 7.22." + "# Example of the SATplan algorithm from Figure 7.22:" ] }, { @@ -724,7 +722,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# The unify() algorithm from Figure 9.1\n""\n""Returns a substitution to make the first 2 arguments identical, and the third argument is the substitution built up so far." + "# The unify() algorithm from Figure 9.1:\n", + "\n", + " Returns a substitution to make the first 2 arguments identical, and the third argument is the substitution built up so far." ] }, { @@ -1014,4 +1014,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} +} \ No newline at end of file From ad5b1509fadaa3d26a6abf4ad284461d593dd764 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sun, 26 Mar 2017 23:23:00 +0530 Subject: [PATCH 67/69] Merge remote-tracking branch 'origin/master' --- logic.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logic.ipynb b/logic.ipynb index 57f782332..7c12d7c66 100644 --- a/logic.ipynb +++ b/logic.ipynb @@ -722,7 +722,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# The unify() algorithm from Figure 9.1:\n", + "# unify() algorithm from Figure 9.1:\n", "\n", " Returns a substitution to make the first 2 arguments identical, and the third argument is the substitution built up so far." ] From e1f1e324b5c6e344b3af7178bc3f85f6a22faec3 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sun, 26 Mar 2017 23:30:49 +0530 Subject: [PATCH 68/69] Merge remote-tracking branch 'origin/master' # Conflicts: # planning.py --- planning.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/planning.ipynb b/planning.ipynb index e8230e5e2..3ce5f081e 100644 --- a/planning.ipynb +++ b/planning.ipynb @@ -40,9 +40,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "1. `init(self, initial_state, actions, goal_test)`: the constructor creates a knowledge base with initial state, initialises actions and goal_test_func function with goal_test.\n", - "2. `goal_test(self)`: initialises goal_test with kb.\n", - "3. `act(self, action)`: performs the action given as argument, along with checks preformed on pre-conditions." + "1. **`init(self, initial_state, actions, goal_test)`**: the constructor creates a knowledge base with initial state, initialises actions and `goal_test_func` function with `goal_test`.\n", + "2. **`goal_test(self)`**: initialises `goal_test` with `kb`.\n", + "3. **`act(self, action)`**: performs the action given as argument, along with checks preformed on pre-conditions." ] }, { From b114a51f74addcea552d2432b5f1c269c7932868 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Sun, 26 Mar 2017 23:32:08 +0530 Subject: [PATCH 69/69] Merge remote-tracking branch 'origin/master' # Conflicts: # planning.py --- planning.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planning.ipynb b/planning.ipynb index 3ce5f081e..091a1c916 100644 --- a/planning.ipynb +++ b/planning.ipynb @@ -93,8 +93,7 @@ "source": [ "# AIR CARGO PROBLEM from Figure 10.1\n", "\n", - "To define a problem we have to define a initial (predicates which are true at the beginning of the problem) and a goal state (predicates which are true at\n", - " the end of the problem). \n", + "To define a problem we have to define an initial state (predicates which are true at the beginning of the problem) and a goal state (predicates which are true at the end of the problem). \n", "\n", "\n", "The following code defines the initial state for the problem" @@ -205,6 +204,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ + "\n", "`precond_` is used to denote predicates which must be True **before** the action.\n", "eg: \n", "\n",