From db544fb125838ed722533db190cd5bfb52491208 Mon Sep 17 00:00:00 2001 From: Francois Pelletier Date: Sat, 16 Feb 2019 21:19:13 -0500 Subject: [PATCH 1/2] ajout commentaire et clarification code --- search/search.py | 4 ++++ search/searchAgents.py | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/search/search.py b/search/search.py index 76be37b..6d128f0 100644 --- a/search/search.py +++ b/search/search.py @@ -10,6 +10,10 @@ # (denero@cs.berkeley.edu) and Dan Klein (klein@cs.berkeley.edu). # Student side autograding was added by Brad Miller, Nick Hay, and # Pieter Abbeel (pabbeel@cs.berkeley.edu). +# +# IFT-7025 Hier 2019 +# François Pelletier +# 908144032 """ diff --git a/search/searchAgents.py b/search/searchAgents.py index f43a88b..0c8e257 100644 --- a/search/searchAgents.py +++ b/search/searchAgents.py @@ -10,7 +10,10 @@ # (denero@cs.berkeley.edu) and Dan Klein (klein@cs.berkeley.edu). # Student side autograding was added by Brad Miller, Nick Hay, and # Pieter Abbeel (pabbeel@cs.berkeley.edu). - +# +# IFT-7025 Hier 2019 +# François Pelletier +# 908144032 """ This file contains all of the agents that can be selected to control Pacman. To @@ -307,7 +310,7 @@ class CornersProblem(search.SearchProblem): "*** YOUR CODE HERE ***" currentPosition, currentCornerSet = state # print "Validation du but a ", currentPosition, "Coins restants: ", currentCornerSet - # On atteint le but s'il reste un seul coin a atteindre, et que c'est l'etat actuel + # On atteint le but s'il restait un seul coin a atteindre, et que c'est l'etat actuel # print "But atteint" return (len(currentCornerSet)==1 and currentPosition in currentCornerSet) @@ -393,7 +396,8 @@ def cornersHeuristic(state, problem): # Liste des distances de Manhattan vers les sommets restants mh=[] for i in range(nb_corners): - mh.append(util.manhattanDistance(currentPosition,currentCornerList[i])) + current_distance = util.manhattanDistance(currentPosition,currentCornerList[i]) + mh.append(current_distance) # On retourne la plus grande distance, qui est le meilleur scenario possible pour terminer return max(mh) From b25061df5817f822aad6bf6df9e01ba69038ef9d Mon Sep 17 00:00:00 2001 From: Francois Pelletier Date: Sat, 16 Feb 2019 21:23:24 -0500 Subject: [PATCH 2/2] update readme --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 12cc39a..88133ee 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ -# ift7025-tp1 +# IFT-7025 Hiver 2019 - Travail pratique #1 + +IFT-7025 Hiver 2019 +Travail pratique #1 +remis par François Pelletier 908144032