Τεχνητή Νοημοσύνη ΙΙ Εαρινό Εξάμηνο Εργασία ΙΙ: Σχεδιασμός Ημερομηνία Παράδοσης: 26 Μαρτίου 2012
|
|
- Θέτις Κοντολέων
- 9 χρόνια πριν
- Προβολές:
Transcript
1 Τεχνητή Νοημοσύνη ΙΙ Εαρινό Εξάμηνο Εργασία ΙΙ: Σχεδιασμός Ημερομηνία Παράδοσης: 26 Μαρτίου 2012 Ον/μο φοιτητή: Μπεγέτης Νικόλαος Α.Μ.: Άσκηση 1(i) Το πλάνο εκτέλεσης για το πρόβλημα σχεδιασμού (gripper-domain.txt, gripper-problem1.txt):
2 Το πλάνο εκτέλεσης για το πρόβλημα σχεδιασμού (gripper-domain.txt, gripper-problem2.txt):
3 Άσκηση 1(ii) Το αρχείο gripper-problem3.txt το οποίο περιγράφει ένα πρόβλημα σχεδιασμού που εμπλέκει 6 κύβους με την περιγραφή που δίνεται στην εικόνα της εκφώνησης είναι: (define (problem gripper1) (:domain gripper) (:objects a b c d e f ) (:init (on-table a) (on-table b) (on d e) (on c f) (on e a) (on f b) (clear c) (clear d) (grip-empty))
4 (:goal (and (on b c) (on e f) (on a b) (on d e))) ) Το πλάνο εκτέλεσης για το πρόβλημα σχεδιασμού (gripper-domain.txt, gripper-problem3.txt) είναι:
5
6 Άσκηση 2(i) Όπως αναγράφεται και στην εκφώνηση το κατηγόρημα dfs( OpenStates, VisitedStates, Solution) που υπάρχει προς το παρόν στο αρχείο planner.pl απλώς παίρνει το πρώτο ζεύγος της λίστας OpenStates και ελέγχει αν η κατάσταση που περιγράφεται από το δεύτερο στοιχείο του ζεύγους ικανοποιεί το στόχο. Όπως εύκολα μπορούμε να παρατηρήσουμε για το πρόβλημα gripperproblem0.txt η κατάσταση στόχου επιτυγχάνεται ήδη από την αρχική κατάσταση -τοποθέτηση- των κύβων. Συνεπώς στο αρχείο planner.pl ικανοποιείται το κατηγόρημα satisfies_goal(currentstate), - γραμμή 108- επιστρέφοντας true με αποτέλεσμα η εκτέλεση του κατηγορήματος dfs(openstates, VisitedStates, Solution) να προχωράει και να μη σταματάει στη γραμμή 108 και έτσι στο τέλος να εκτυπώνεται η λύση που είναι true. Από την άλλη πλευρά, για το πρόβλημα gripper-problem1.txt η κατάσταση στόχου δεν επιτυγχάνεται από την αρχική κατάσταση, δηλαδή δεν ικανοποιείται το κατηγόρημα satisfies_goal(currentstate), το οποίο επιστρέφει false, με αποτέλεσμα η εκτέλεση του κατηγορήματος dfs(openstates, VisitedStates, Solution) να σταματάει στη γραμμή 108. Τότε θα εκτελεστεί το επόμενο στη σειρά dfs(openstates, VisitedStates, Solution) το οποίο θα ελέγξει εάν η CurrentState ανήκει στη λίστα με τις VisitedStates μέσω του κατηγορήματος member(currentstate, VisitedStates),. Τότε το κατηγόρημα αυτό θα επιστρέψει false και έτσι θα εκτελεστεί το επόμενο στη σειρά dfs(openstates, VisitedStates, Solution). Αυτό το κατηγόρημα θα εκτελεστεί σωστά τυπώνοντας μία τελεία., και θα καλέσει ξανά αναδρομικά τον εαυτό του με dfs(restofopenstates, [CurrentState VisitedStates], Solution), αλλάζοντας δηλαδή το δεύτερο όρισμα του κατηγορήματος. Ξεκινώντας πάλι από την αρχή στις εκτυπώσεις παρατηρούμε ότι πλέον η αρχική κατάσταση ανήκει στις VisitedStates και ότι δεν υπάρχουν άλλες διαθέσιμες OpenStates. Έτσι στη γραμμή 100 στην εντολή [FirstPair _] = OpenStates, επιστρέφεται false αφού δεν υπάρχουν άλλα OpenStates. Έπειτα εκτελείται για δεύτερη φορά το επόμενο dfs(openstates, VisitedStates, Solution) το οποίο επειδή δεν υπάρχουν άλλα OpenStates θα επιστρέψει και αυτό false. Τέλος, φτάνοντας στο τελευταίο στη σειρά κατηγόρημα dfs(openstates, VisitedStates, Solution) θα επιστρέψει και αυτό false πάλι για τον ίδιο λόγο με αποτέλεσμα η αναζήτηση search(solution), να ολοκληρωθεί ανεπιτυχώς και να τερματίσει το ερώτημα με false. Συνοψίζοντας, ο λόγος για τον οποίο η ημιτελής υλοποίηση του planner αδυνατεί να βρει λύση στη δεύτερη περίπτωση είναι ότι δεν γίνεται κάποια αναζήτηση για εύρεση νέων OpenStates που μπορούν να παραχθούν έπειτα από την εφαρμογή κάποιας νέας ενέργειας. Συνεπώς, η λίστα των OpenStates δεν επεκτείνεται, και στην περίπτωση που δεν περιλαμβάνει ήδη την κατάσταση στόχου τότε σίγουρα θα οδηγήσει σε αποτυχία. Αυτό γιατί κάποια στιγμή οι καταστάσεις που περιλαμβάνονται στη λίστα των OpenStates θα έχουν όλες εξερευνηθεί τουλάχιστον μία φορά χωρίς να βρεθεί σε αυτές η κατάσταση στόχου. Άσκηση 2(ii) Το κατηγόρημα dfs/3 τροποποιήθηκε κατάλληλα ώστε να υλοποιεί μία αναδρομική εκδοχή της αναζήτησης που πραγματοποιείται με το loop της DepthFirstPlanner που μας δόθηκε στην πρώτη εργασία του μαθήματος. Ο κώδικας που υλοποιεί αυτή την αναδρομή είναι ο εξής: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% dfs(+openstates, +VisitedStates, -Solution) %% dfs/3 should implement a recursive depth-first search for solving %% the parsed planning problem using progression.
7 %% At the moment it only checks if the first pair in the list of open %% states, that is OpenStates, satisfies the goal. %% %% YOU NEED TO ADD CODE HERE! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Check if the first state in the list of open states satisfies the goal. dfs(openstates, VisitedStates, Solution):- % Print useful debug information print('*debug Information* A call to dfs/3 has just been performed\n'), print('openstates:' ),print(openstates), nl, print('visitedstates:' ),print(visitedstates), nl, % Get the first pair from the list OpenStates [FirstPair _] = OpenStates, % Get the first element of the pair as the current list of actions % and the second element as the current state [CurrentListOfActions,CurrentState] = FirstPair, % Print some more debug information print('currentlistofactions:' ),print(currentlistofactions), nl, print('currentstate:' ),print(currentstate), nl, % Check if the current state satisfies the goal satisfies_goal(currentstate), % If we get up to here then the goal has been satisfied, % therefore we are done!, Solution = CurrentListOfActions. % Then check if the first state in the list of open states is already visited. dfs(openstates, VisitedStates, Solution):- % Get the first pair from the list OpenStates [FirstPair RestOfOpenStates] = OpenStates, % Get the first element of the pair as the current list of actions % and the second element as the current state
8 [_CurrentListOfActions,CurrentState] = FirstPair, % Debug information -- uncomment to print useful information % print('*debug* check state if it is already visited:\n'), % print(currentstate), nl, states % Check if the state description is already in the list of visited member(currentstate, VisitedStates), nl, nl,nl,print('currentstate EXISTS in VisitedStates...Try next Action' ), nl,nl,nl, % If we get up to here, then it's a state we've seen before. % No need to expand this node using the next rule, so no more bactracking!!, % Debug information -- uncomment to print useful information % print('*debug* state is already visited:\n'), % print(currentstate), nl, % Continue search using the remaining list of open states. dfs(restofopenstates, VisitedStates, Solution). % Finally, expand the first state in the list of open states and recurse. dfs(openstates, VisitedStates, Solution):- % Get the first pair from the list OpenStates [FirstPair RestOfOpenStates] = OpenStates, % nl,print('firstpair= ' ),print(firstpair), % nl,print('restofopenstates= ' ),print(restofopenstates), % Get the first element of the pair as the current list of actions % and the second element as the current state [CurrentListOfActions,CurrentState] = FirstPair, % Debug information -- uncomment to print useful information % print('*debug* expand state:\n'), print(currentstate), nl, % Debug information -- uncomment to print useful information % print('*debug* open states:\n'), print(openstates), nl, % Update the global variables that hold statistics about the search;
9 % this should be called whenever a pair from OpenStates is processed % to produce the successor states that will be inserted in OpenStates. stat_node, % Print a dot for every node expanded. nl,print('...'), nl, flush_output, % Expand the current state by inserting the successor states in the % front of the list of open states, and recurse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % *** ADD YOUR CODE HERE *** % % *** REPLACE NEXT LINE *** % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Generates all the possible successor states from CurrentState. Action is % an applicable ground action to State, and NextState is the % successor state when the effects of Action are applied to State. findall([[newaction CurrentListOfActions], NextState], progress(currentstate, NewAction, NextState), NewOpenStates), nl,nl,print('listofnewopenstates = ' ),print(newopenstates), nl, nl,nl,print('listofrestopenstates = ' ),print(restofopenstates), nl, % Append new openstates with old openstates append(newopenstates, RestOfOpenStates, OpenStates2), nl,nl,print('openstates = ' ),print(openstates), nl, dfs(openstates2, [CurrentState VisitedStates], Solution). Tα αποτελέσματα που παράγονται από την εκτέλεση του planner για το πρόβλημα (gripper-domain.txt, gripper-problem1.txt) είναι: (Παρατίθενται μόνο τα αποτελέσματα της τελευταίας αναδρομικής κλήσης του κατηγορήματος Αν ζητηθεί μπορώ να συμπεριλάβω και τα υπόλοιπα, αλλιώς μπορείτε να τα δείτε και εάν εκτελέσετε τον planner) *Debug Information* A call to dfs/3 has just been performed OpenStates:[[[stack(c,b),pick-up(c),stack(b,a),pick-up(b)],[grip-empty,clear(c),ontable(a),on(b,a),on(c,b)]],[[unstack(b,a),stack(b,a),pick-up(b)],[clear(a),clear(c),holding(b),on-table(a),ontable(c)]],[[stack(b,c),pick-up(b)],[grip-empty,clear(a),clear(b),on-table(a),on-table(c),on(b,c)]],[[pickup(c)],[clear(a),clear(b),holding(c),on-table(a),on-table(b)]]] VisitedStates:[[clear(b),holding(c),on-table(a),on(b,a)],[grip-empty,clear(b),clear(c),on-table(a),ontable(c),on(b,a)],[clear(a),clear(c),holding(b),on-table(a),on-table(c)],[grip-empty,clear(b),ontable(c),on(a,c),on(b,a)],[clear(a),holding(b),on-table(c),on(a,c)],[grip-empty,clear(a),clear(b),on-table(b),ontable(c),on(a,c)],[grip-empty,clear(c),on-table(b),on(a,b),on(c,a)],[clear(a),holding(c),ontable(b),on(a,b)],[grip-empty,clear(a),clear(c),on-table(b),on-
10 table(c),on(a,b)],[clear(b),clear(c),holding(a),on-table(b),on-table(c)],[gripempty,clear(a),clear(b),clear(c),on-table(a),on-table(b),on-table(c)]] CurrentListOfActions:[stack(c,b),pick-up(c),stack(b,a),pick-up(b)] CurrentState:[grip-empty,clear(c),on-table(a),on(b,a),on(c,b)] Solution found! Domain name: gripper Problem name: gripper1 Time: sec Search length: 11 nodes Solution length: 4 actions Solution: (stack c b) (pick-up c) (stack b a) (pick-up b) true. Αντίστοιχα, τα αποτελέσματα που παράγονται από την εκτέλεση του planner για το πρόβλημα (gripperdomain.txt, gripper-problem2.txt) είναι: (Παρατίθενται μόνο τα αποτελέσματα της τελευταίας αναδρομικής κλήσης του κατηγορήματος Αν ζητηθεί μπορώ να συμπεριλάβω και τα υπόλοιπα, αλλιώς μπορείτε να τα δείτε και εάν εκτελέσετε τον planner) *Debug Information* A call to dfs/3 has just been performed OpenStates:[[[stack(c,b),pick-up(c),stack(b,a),unstack(b,c),put-down(a),unstack(a,b)],[gripempty,clear(c),on-table(a),on(b,a),on(c,b)]],[[unstack(b,a),stack(b,a),unstack(b,c),putdown(a),unstack(a,b)],[clear(a),clear(c),holding(b),on-table(a),on-table(c)]],[[stack(b,c),unstack(b,c),putdown(a),unstack(a,b)],[grip-empty,clear(a),clear(b),on-table(a),ontable(c),on(b,c)]],[[stack(a,b),unstack(a,b)],[grip-empty,clear(a),on-table(c),on(a,b),on(b,c)]]] VisitedStates:[[clear(b),holding(c),on-table(a),on(b,a)],[grip-empty,clear(b),clear(c),on-table(a),ontable(c),on(b,a)],[grip-empty,clear(a),on-table(b),on(a,c),on(c,b)],[clear(c),holding(a),ontable(b),on(c,b)],[grip-empty,clear(a),clear(c),on-table(a),on-table(b),on(c,b)],[grip-empty,clear(b),ontable(a),on(b,c),on(c,a)],[clear(c),holding(b),on-table(a),on(c,a)],[grip-empty,clear(b),clear(c),on-table(a),ontable(b),on(c,a)],[clear(a),clear(b),holding(c),on-table(a),on-table(b)],[grip-empty,clear(b),ontable(c),on(a,c),on(b,a)],[clear(a),holding(b),on-table(c),on(a,c)],[grip-empty,clear(a),clear(b),on-table(b),ontable(c),on(a,c)],[grip-empty,clear(c),on-table(b),on(a,b),on(c,a)],[clear(a),holding(c),ontable(b),on(a,b)],[grip-empty,clear(a),clear(c),on-table(b),ontable(c),on(a,b)],[clear(b),clear(c),holding(a),on-table(b),on-table(c)],[gripempty,clear(a),clear(b),clear(c),on-table(a),on-table(b),on-table(c)],[clear(a),clear(c),holding(b),ontable(a),on-table(c)],[grip-empty,clear(a),clear(b),on-table(a),on-table(c),on(b,c)],[clear(b),holding(a),ontable(c),on(b,c)],[grip-empty,clear(a),on-table(c),on(a,b),on(b,c)]] CurrentListOfActions:[stack(c,b),pick-up(c),stack(b,a),unstack(b,c),put-down(a),unstack(a,b)] CurrentState:[grip-empty,clear(c),on-table(a),on(b,a),on(c,b)]
11 Solution found! Domain name: gripper Problem name: gripper1 Time: sec Search length: 21 nodes Solution length: 6 actions Solution: (stack c b) (pick-up c) (stack b a) (unstack b c) (put-down a) (unstack a b) true. **Τέλος, αξίζει να σημειωθεί ότι οι κινήσεις μέσω των οποίων φτάνουμε στο στόχο εμφανίζονται από την τελευταία προς την αρχική. Αυτό δεν επηρεάζει το αποτέλεσμα μιας και η λεξικογραφική ταξινόμηση των καταστάσεων γίνεται με βάση μόνο το State ως string όπως χαρακτηριστικά αναφέρεται και στη 2 η άσκηση της 1 ης εργασίας. Εύκολα θα μπορούσαμε να επεκτείναμε την λίστα ListOfActions βάζοντας την καινούργια ενέργεια (NewAction) κάθε φορά στο τέλος της CurrentListOfActions και όχι στην αρχή της, παίρνοντας έτσι την αντίστροφη σειρά στο Solution. Άσκηση 3(i) Tα αποτελέσματα που παράγονται από την εκτέλεση του planner για το πρόβλημα (sokoban-domain.txt, sokoban-problem1.txt) είναι: (Παρατίθενται μόνο τα αποτελέσματα της τελευταίας αναδρομικής κλήσης του κατηγορήματος Αν ζητηθεί μπορώ να συμπεριλάβω και τα υπόλοιπα, αλλιώς μπορείτε να τα δείτε και εάν εκτελέσετε τον planner) *Debug Information* A call to dfs/3 has just been performed OpenStates:[[[push(c3-1,c3-2,c3-3,up,box1),move(c2-1,c3-1,right),move(c1-1,c2-1,right)],[empty(c1-1),empty(c1-2),empty(c1-3),empty(c2-1),empty(c3-1),robot-at(c3-2),object-at(box1,c3-3),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)]]] VisitedStates:[[empty(c1-1),empty(c1-2),empty(c1-3),empty(c2-1),empty(c3-3),robot-at(c3-1),object- at(box1,c3-2),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)],[empty(c1-1),empty(c1-2),empty(c1-3),empty(c3-1),empty(c3-3),robot-at(c2-1),object-at(box1,c3-2),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-
12 1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)],[empty(c1-1),empty(c1-2),empty(c2-1),empty(c3-1),empty(c3-3),robot-at(c1-3),object-at(box1,c3-2),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)],[empty(c1-1),empty(c1-3),empty(c2-1),empty(c3-1),empty(c3-3),robot-at(c1-2),object-at(box1,c3-2),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)],[empty(c1-2),empty(c1-3),empty(c2-1),empty(c3-1),empty(c3-3),robot-at(c1-1),object-at(box1,c3-2),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)]] CurrentListOfActions:[push(c3-1,c3-2,c3-3,up,box1),move(c2-1,c3-1,right),move(c1-1,c2-1,right)] CurrentState:[empty(c1-1),empty(c1-2),empty(c1-3),empty(c2-1),empty(c3-1),robot-at(c3-2),object- at(box1,c3-3),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)] Solution found! Domain name: sokoban Problem name: sokoban1 Time: sec Search length: 5 nodes Solution length: 3 actions Solution: (push c3-1 c3-2 c3-3 up box1) (move c2-1 c3-1 right) (move c1-1 c2-1 right) true. Αντίστοιχα, τα αποτελέσματα που παράγονται από την εκτέλεση του planner για το πρόβλημα (sokoban-
13 domain.txt, sokoban-problem2.txt) είναι: (Παρατίθενται μόνο τα τελικά αποτελέσματα, γιατί μόνο τα αποτελέσματα από την τελευταία αναδρομική κλήση του κατηγορήματος ξεπερνούν τις 10 σελίδες Αν ζητηθεί μπορώ να συμπεριλάβω και τα υπόλοιπα, αλλιώς μπορείτε να τα δείτε και εάν εκτελέσετε τον planner) *Debug Information* A call to dfs/3 has just been performed (Τα αποτελέσματα από την τελευταία εκτέλεση παραλείπονται λόγω πάρα πολύ μεγάλης έκτασης) Solution found! Domain name: sokoban Problem name: sokoban2 Time: sec Search length: 1274 nodes Solution length: 107 actions Solution: (push c7-1 c7-2 c7-3 up box1) (move c6-1 c7-1 right) (move c5-1 c6-1 right) (move c4-1 c5-1 right) (move c4-2 c4-1 down) (move c5-2 c4-2 left) (move c6-2 c5-2 left) (push c5-2 c6-2 c7-2 right box1) (move c4-2 c5-2 right) (move c4-1 c4-2 up) (move c5-1 c4-1 left) (move c6-1 c5-1 left) (move c7-1 c6-1 left) (move c7-2 c7-1 down) (move c7-3 c7-2 down) (move c7-4 c7-3 down) (move c6-4 c7-4 right) (move c5-4 c6-4 right) (move c5-5 c5-4 down) (move c5-6 c5-5 down) (move c5-7 c5-6 down) (move c5-8 c5-7 down) (move c4-8 c5-8 right) (move c4-7 c4-8 up) (move c3-7 c4-7 right) (move c3-8 c3-7 down) (move c2-8 c3-8 right) (move c2-7 c2-8 up) (move c2-6 c2-7 up) (move c2-5 c2-6 up) (move c2-4 c2-5 up) (move c2-3 c2-4 up) (move c3-3 c2-3 left) (move c4-3 c3-3 left) (move c5-3 c4-3 left) (move c6-3 c5-3 left) (push c6-4 c6-3 c6-2 down box1) (move c5-4 c6-4 right) (move c5-5 c5-4 down) (move c5-6 c5-5 down) (move c5-7 c5-6 down) (move c5-8 c5-7 down) (move c4-8 c5-8 right) (move c4-7 c4-8 up) (move c3-7 c4-7 right) (move c3-8 c3-7 down) (move c2-8 c3-8 right) (move c2-7 c2-8 up) (move c2-6 c2-7 up) (move c2-5 c2-6 up) (move c2-4 c2-5 up) (move c2-3 c2-4 up) (move c3-3 c2-3 left) (move c4-3 c3-3 left) (move c5-3 c4-3 left) (push c4-3 c5-3 c6-3 right box1) (move c3-3 c4-3 right) (move c2-3 c3-3 right) (move c2-4 c2-3 down) (move c2-5 c2-4 down) (move c2-6 c2-5 down) (move c2-7 c2-6 down) (move c3-7 c2-7 left) (move c4-7 c3-7 left) (move c5-7 c4-7 left) (move c5-6 c5-7 up) (move c5-5 c5-6 up) (move c5-4 c5-5 up) (push c5-5 c5-4 c5-3 down box1) (push c5-6 c5-5 c5-4 down box1) (push c5-7 c5-6 c5-5 down box1) (push c5-8 c5-7 c5-6 down box1) (move c4-8 c5-8 right) (move c3-8 c4-8 right) (move c2-8 c3-8 right) (move c2-7 c2-8 up) (move c3-7 c2-7 left) (move c4-7 c3-7 left) (push c3-7 c4-7 c5-7 right box1) (push c2-7 c3-7 c4-7 right box1) (move c2-8 c2-7 down) (move c3-8 c2-8 left) (move c4-8 c3-8 left) (move c4-7 c4-8 up) (move c5-7 c4-7 left) (move c5-6 c5-7 up) (move c5-5 c5-6 up) (move c5-4 c5-5 up) (move c5-3 c5-4 up) (move c5-2 c5-3 up) (move c5-1 c5-2 up) (move c4-1 c5-1 right) (move c4-2 c4-1 down) (move c4-3 c4-2 down) (move c3-3 c4-3 right) (move c2-3 c3-3 right) (move c2-4 c2-3 down) (move c2-5 c2-4 down) (move c2-6 c2-5 down) (move c3-6 c2-6 left) (push c3-5 c3-6 c3-7 up box1) (move c2-5 c3-5 right) (move c2-4 c2-5 up) (move c2-3 c2-4 up) (move c3-3 c2-3 left) (move c4-3 c3-3 left) (move c5-3 c4-3 left) true. Τέλος, τα αποτελέσματα που παράγονται από την εκτέλεση του planner για το πρόβλημα (sokobandomain.txt, sokoban-problem3.txt) είναι: (Παρατίθενται μόνο τα τελικά αποτελέσματα, γιατί μόνο τα αποτελέσματα από την τελευταία αναδρομική
14 κλήση του κατηγορήματος ξεπερνούν τις 10 σελίδες Αν ζητηθεί μπορώ να συμπεριλάβω και τα υπόλοιπα, αλλιώς μπορείτε να τα δείτε και εάν εκτελέσετε τον planner) *Debug Information* A call to dfs/3 has just been performed (Τα αποτελέσματα από την τελευταία εκτέλεση παραλείπονται λόγω πάρα πολύ μεγάλης έκτασης) Solution found! Domain name: sokoban Problem name: sokoban3 Time: sec Search length: 3069 nodes Solution length: 108 actions Solution: (push c2-3 c3-3 c4-3 right box1) (push c1-3 c2-3 c3-3 right box1) (move c1-2 c1-3 up) (move c2-2 c1-2 left) (push c2-1 c2-2 c2-3 up box1) (move c1-1 c2-1 right) (move c1-2 c1-1 down) (move c1-3 c1-2 down) (move c2-3 c1-3 left) (move c3-3 c2-3 left) (move c3-2 c3-3 up) (push c4-2 c3-2 c2-2 left box1) (move c4-3 c4-2 down) (push c3-3 c4-3 c5-3 right box2) (push c2-3 c3-3 c4-3 right box2) (push c1-3 c2-3 c3-3 right box2) (move c1-2 c1-3 up) (move c2-2 c1-2 left) (push c2-1 c2-2 c2-3 up box2) (move c1-1 c2-1 right) (move c1-2 c1-1 down) (move c1-3 c1-2 down) (move c2-3 c1-3 left) (move c3-3 c2-3 left) (move c4-3 c3-3 left) (move c4-2 c4-3 up) (push c5-2 c4-2 c3-2 left box1) (move c5-3 c5-2 down) (move c5-4 c5-3 down) (move c4-4 c5-4 right) (move c4-3 c4-4 up) (push c4-4 c4-3 c4-2 down box1) (move c5-4 c4-4 left) (move c5-3 c5-4 up) (push c6-3 c5-3 c4-3 left box1) (move c6-4 c6-3 down) (move c5-4 c6-4 right) (move c4-4 c5-4 right) (move c4-3 c4-4 up) (move c3-3 c4-3 right) (move c3-2 c3-3 up) (push c4-2 c3-2 c2-2 left box2) (move c4-3 c4-2 down) (push c3-3 c4-3 c5-3 right box1) (move c2-3 c3-3 right) (move c1-3 c2-3 right) (move c1-2 c1-3 up) (move c2-2 c1-2 left) (push c1-2 c2-2 c3-2 right box2) (move c1-3 c1-2 down) (move c2-3 c1-3 left) (move c3-3 c2-3 left) (move c3-2 c3-3 up) (push c4-2 c3-2 c2-2 left box2) (push c5-2 c4-2 c3-2 left box2) (move c5-3 c5-2 down) (push c6-3 c5-3 c4-3 left box1) (move c6-4 c6-3 down) (move c5-4 c6-4 right) (move c4-4 c5-4 right) (move c4-3 c4-4 up) (push c3-3 c4-3 c5-3 right box1) (push c2-3 c3-3 c4-3 right box1) (push c1-3 c2-3 c3-3 right box1) (move c1-2 c1-3 up) (move c2-2 c1-2 left) (move c3-2 c2-2 left) (move c3-3 c3-2 down) (push c4-3 c3-3 c2-3 left box1) (push c4-4 c4-3 c4-2 down box2) (move c5-4 c4-4 left) (move c5-3 c5-4 up) (move c5-2 c5-3 up) (move c4-2 c5-2 right) (move c3-2 c4-2 right) (move c2-2 c3-2 right) (move c2-1 c2-2 up) (move c1-1 c2-1 right) (move c1-2 c1-1 down) (move c1-3 c1-2 down) (move c2-3 c1-3 left) (push c1-3 c2-3 c3-3 right box1) (move c1-2 c1-3 up) (move c2-2 c1-2 left) (push c2-1 c2-2 c2-3 up box1) (move c1-1 c2-1 right) (move c1-2 c1-1 down) (move c1-3 c1-2 down) (move c2-3 c1-3 left) (move c3-3 c2-3 left) (move c3-2 c3-3 up) (push c4-2 c3-2 c2-2 left box1) (push c5-2 c4-2 c3-2 left box1) (move c5-3 c5-2 down) (push c6-3 c5-3 c4-3 left box2) (move c6-4 c6-3 down) (move c5-4 c6-4 right) (move c4-4 c5-4 right) (move c4-3 c4-4 up) (push c3-3 c4-3 c5-3 right box2) (push c2-3 c3-3 c4-3 right box2) (push c1-3 c2-3 c3-3 right box2) (move c1-2 c1-3 up) (move c2-2 c1-2 left) (move c3-2 c2-2 left) (move c3-3 c3-2 down) (push c4-3 c3-3 c2-3 left box2) (push c4-4 c4-3 c4-2 down box1) true. **Τέλος, αξίζει να σημειωθεί ότι οι κινήσεις μέσω των οποίων φτάνουμε στο στόχο εμφανίζονται από την τελευταία προς την αρχική. Αυτό δεν επηρεάζει το αποτέλεσμα μιας και η λεξικογραφική ταξινόμηση των καταστάσεων γίνεται με βάση μόνο το State ως string όπως χαρακτηριστικά αναφέρεται και στη 2 η άσκηση της 1 ης εργασίας. Εύκολα θα μπορούσαμε να επεκτείναμε την λίστα ListOfActions βάζοντας την καινούργια ενέργεια (NewAction) κάθε φορά στο τέλος της CurrentListOfActions και όχι στην αρχή της, παίρνοντας έτσι την αντίστροφη σειρά στο Solution.
15 Άσκηση 3(ii) Το κατηγόρημα astar/3 τροποποιήθηκε κατάλληλα ώστε να υλοποιεί μία αναδρομική εκδοχή της αναζήτησης που πραγματοποιείται με το loop της AStarPlanner που μας ζητήθηκε να υλοποιήσουμε στην 3 η άσκηση της 1 ης εργασίας του μαθήματος. Ο κώδικας που υλοποιεί αυτή την αναδρομή είναι ο εξής: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% astar(+openstates, +VisitedStates, -Solution) %% astar/3 should implement a recursive depth-first search using an %% heurestic function for solving the parsed planning problem using progression. %% At the moment it only checks if the first pair in the list of open %% states, that is OpenStates, satisfies the goal. %% %% YOU NEED TO ADD CODE HERE! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Check if the first state in the list of open states satisfies the goal. astar(openstates, VisitedStates, Solution):- % Print useful debug information print('*debug Information* A call to astar/3 has just been performed\n'), % print('openstates:' ),print(openstates), nl, % print('visitedstates:' ),print(visitedstates), nl, % Get the first pair from the list OpenStates [FirstPair _] = OpenStates, % print('firstpair:' ),print(firstpair), nl, % Get the first element of the pair as the current list of actions % and the second element as the current state [Evaluation,CurrentListOfActions,CurrentState] = FirstPair, % Print some more debug information % print('evaluation:' ),print(evaluation), nl, % print('currentlistofactions:' ),print(currentlistofactions), nl, % print('currentstate:' ),print(currentstate), nl, % Check if the current state satisfies the goal
16 satisfies_goal(currentstate), % If we get up to here then the goal has been satisfied, % therefore we are done!, Solution = CurrentListOfActions. % Then check if the first state in the list of open states is already visited. astar(openstates, VisitedStates, Solution):- % Get the first pair from the list OpenStates [FirstPair RestOfOpenStates] = OpenStates, % Get the first element of the pair as the current list of actions % and the second element as the current state [Evaluation,_CurrentListOfActions,CurrentState] = FirstPair, % Debug information -- uncomment to print useful information % print('*debug* check state if it is already visited:\n'), % print(currentstate), nl, states % Check if the state description is already in the list of visited member(currentstate, VisitedStates), nl, nl,nl,print('currentstate EXISTS in VisitedStates...Try next Action' ), nl,nl,nl, % If we get up to here, then it's a state we've seen before. % No need to expand this node using the next rule, so no more bactracking!!, % Debug information -- uncomment to print useful information % print('*debug* state is already visited:\n'), % print(currentstate), nl, % Continue search using the remaining list of open states. astar(restofopenstates, VisitedStates, Solution). % Finally, expand the first state in the list of open states and recurse. astar(openstates, VisitedStates, Solution):-
17 % Get the first pair from the list OpenStates [FirstPair RestOfOpenStates] = OpenStates, % nl,print('firstpair= ' ),print(firstpair), % nl,print('restofopenstates= ' ),print(restofopenstates), % Get the first element of the pair as the current list of actions % and the second element as the current state [Evaluation,CurrentListOfActions,CurrentState] = FirstPair, % Debug information -- uncomment to print useful information % print('*debug* expand state:\n'), print(currentstate), nl, % Debug information -- uncomment to print useful information % print('*debug* open states:\n'), print(openstates), nl, % Update the global variables that hold statistics about the search; % this should be called whenever a pair from OpenStates is processed % to produce the successor states that will be inserted in OpenStates. stat_node, % Print a dot for every node expanded. nl,print('...'), nl, flush_output, % Expand the current state by inserting the successor states in the % front of the list of open states, and recurse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % *** ADD YOUR CODE HERE *** % % *** REPLACE NEXT LINE *** % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Generates all the possible successor states from CurrentState. Action is % an applicable ground action to State, and NextState is the % successor state when the effects of Action are applied to State. findall([[newaction CurrentListOfActions], NextState], progress(currentstate, NewAction, NextState), NewOpenStates_noEval), % NewOpenStates_noEval is a list currying all NewOpenStates but without being evaluated % we want for every NewOpenState to find the Evaluation and make a new list of NewOpenStates where in the front there is the Evaluation
18 TempOpenStates = [], % iteration predicate recursively evaluates all NewOpenStates_noEval resulting in the new evaluated NewOpenStates by using the helping list TempOpenStates iteration(newopenstates_noeval, TempOpenStates, NewOpenStates), % nl,print('newopenstates = ' ),print(newopenstates), nl, % Append new OpenStates2 with old NewOpenStates append(newopenstates, RestOfOpenStates, OpenStates2), % nl,print('openstates2 = ' ),print(openstates2), nl, % Sorting all of the OpenStates2 resulting in OpenStates3 sort(openstates2,openstates3), % nl,print('sorted OpenStates3 = ' ),print(openstates3), nl, astar(openstates3, [CurrentState VisitedStates], Solution). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% iteration(+newopenstates_noeval, +TempOpenStates, -NewOpenStates) %% iteration/3 should implement a recursive evaluation to all %% NewOpenStates_noEval(Old) by using the temporary list TempOpenStates(Temp) %% for saving the current phases of the NewOpenList(New). When %% NewOpenStates_noEval(Old) becomes an empty list then the second iteration %% predicate is executed, assigning the TempOpenStates(Temp) to the %% NewOpenStates(New) so that to be returned! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration(old, Temp, New):- [FirstNewOpenState RestNewOpenStates] = Old, NewOpenStates = Temp, % nl,nl,print('--- FirstNewOpenState = ' ),print(firstnewopenstate), nl, % nl,nl,print('--- RestNewOpenStates = ' ),print(restnewopenstates), nl, [NewListOfActions, NextState] = FirstNewOpenState, length(newlistofactions,listevaluation), the length of NewListOfActions % ListEvaluation is % nl,nl,print('--- ListEvaluation = ' ),print(listevaluation), nl,
19 h(nextstate,heuresticevaluation), % HeuresticEvaluation is the heurestic cost of NewState % nl,nl,print('--- HeuresticEvaluation = ' ),print(heuresticevaluation), nl, % NewEvaluation = g(newlistofactions) + h(newstate,goal) = length(newlistofactions,listevaluation) + h(nextstate,heuresticevaluation) NewEvaluation is ListEvaluation + HeuresticEvaluation, % nl,nl,print('--- NewEvaluation = ' ),print(newevaluation), nl, NewOpenState = [NewEvaluation,NewListOfActions,NextState], % new OpenState created Temp2 = [NewOpenState NewOpenStates], iteration(restnewopenstates, Temp2, New). iteration(old, Temp, New):- New = Temp. Tα αποτελέσματα που παράγονται από την εκτέλεση του planner για το πρόβλημα (sokoban-domain.txt, sokoban-problem1.txt) είναι: (Παρατίθενται μόνο τα αποτελέσματα της τελευταίας αναδρομικής κλήσης του κατηγορήματος Αν ζητηθεί μπορώ να συμπεριλάβω και τα υπόλοιπα, αλλιώς μπορείτε να τα δείτε και εάν εκτελέσετε τον planner) *Debug Information* A call to dfs/3 has just been performed OpenStates:[[3,[push(c3-1,c3-2,c3-3,up,box1),move(c2-1,c3-1,right),move(c1-1,c2-1,right)],[empty(c1-1),empty(c1-2),empty(c1-3),empty(c2-1),empty(c3-1),robot-at(c3-2),object-at(box1,c3-3),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)]],[4,[move(c1-3,c1-2,down),move(c1-2,c1-3,up),move(c1-1,c1-2,up)],[empty(c1-1),empty(c1-3),empty(c2-1),empty(c3-1),empty(c3-3),robot-at(c1-2),object-at(box1,c3-2),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)]],[4,[move(c3-1,c2-1,left),move(c2-1,c3-1,right),move(c1-1,c2-1,right)],[empty(c1-1),empty(c1-2),empty(c1-3),empty(c3-1),empty(c3-3),robot-at(c2-1),object-at(box1,c3-2),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-
20 2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)]]] VisitedStates:[[empty(c1-1),empty(c1-2),empty(c1-3),empty(c2-1),empty(c3-3),robot-at(c3-1),object- at(box1,c3-2),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)],[empty(c1-1),empty(c1-2),empty(c2-1),empty(c3-1),empty(c3-3),robot-at(c1-3),object-at(box1,c3-2),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)],[empty(c1-1),empty(c1-2),empty(c1-3),empty(c3-1),empty(c3-3),robot-at(c2-1),object-at(box1,c3-2),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)],[empty(c1-1),empty(c1-3),empty(c2-1),empty(c3-1),empty(c3-3),robot-at(c1-2),object-at(box1,c3-2),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)],[empty(c1-2),empty(c1-3),empty(c2-1),empty(c3-1),empty(c3-3),robot-at(c1-1),object-at(box1,c3-2),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)]] CurrentListOfActions:[push(c3-1,c3-2,c3-3,up,box1),move(c2-1,c3-1,right),move(c1-1,c2-1,right)] CurrentState:[empty(c1-1),empty(c1-2),empty(c1-3),empty(c2-1),empty(c3-1),robot-at(c3-2),object- at(box1,c3-3),adjacent(c1-1,c1-2,up),adjacent(c1-1,c2-1,right),adjacent(c1-2,c1-1,down),adjacent(c1-2,c1-3,up),adjacent(c1-2,c2-2,right),adjacent(c1-3,c1-2,down),adjacent(c1-3,c2-3,right),adjacent(c2-1,c1-1,left),adjacent(c2-1,c2-2,up),adjacent(c2-1,c3-1,right),adjacent(c2-2,c1-2,left),adjacent(c2-2,c2-1,down),adjacent(c2-2,c2-3,up),adjacent(c2-2,c3-2,right),adjacent(c2-3,c1-3,left),adjacent(c2-3,c2-2,up),adjacent(c2-3,c3-3,right),adjacent(c3-1,c2-1,left),adjacent(c3-1,c3-2,up),adjacent(c3-2,c2-2,left),adjacent(c3-2,c3-1,down),adjacent(c3-2,c3-3,up),adjacent(c3-3,c2-3,left),adjacent(c3-3,c3-2,down)] Solution found! Domain name: sokoban Problem name: sokoban1
21 Time: sec Search length: 5 nodes Solution length: 3 actions Solution: (push c3-1 c3-2 c3-3 up box1) (move c2-1 c3-1 right) (move c1-1 c2-1 right) true Αντίστοιχα, τα αποτελέσματα που παράγονται από την εκτέλεση του planner για το πρόβλημα (sokobandomain.txt, sokoban-problem2.txt) είναι: (Παρατίθενται μόνο τα τελικά αποτελέσματα, γιατί μόνο τα αποτελέσματα από την τελευταία αναδρομική κλήση του κατηγορήματος ξεπερνούν τις 10 σελίδες Αν ζητηθεί μπορώ να συμπεριλάβω και τα υπόλοιπα, αλλιώς μπορείτε να τα δείτε και εάν εκτελέσετε τον planner) *Debug Information* A call to dfs/3 has just been performed (Τα αποτελέσματα από την τελευταία εκτέλεση παραλείπονται λόγω πάρα πολύ μεγάλης έκτασης) Solution found! Domain name: sokoban Problem name: sokoban2 Time: sec Search length: 983 nodes Solution length: 25 actions Solution: (push c5-3 c6-3 c7-3 right box1) (push c4-3 c5-3 c6-3 right box1) (move c4-2 c4-3 up) (move c5-2 c4-2 left) (move c6-2 c5-2 left) (move c6-3 c6-2 down) (move c6-4 c6-3 down) (move c5-4 c6-4 right) (push c5-5 c5-4 c5-3 down box1) (push c5-6 c5-5 c5-4 down box1) (push c5-7 c5-6 c5-5 down box1) (push c5-8 c5-7 c5-6 down box1) (move c4-8 c5-8 right) (move c4-7 c4-8 up) (push c3-7 c4-7 c5-7 right box1) (push c2-7 c3-7 c4-7 right box1) (move c2-6 c2-7 up) (move c3-6 c2-6 left) (push c3-5 c3-6 c3-7 up box1) (move c2-5 c3-5 right) (move c2-4 c2-5 up) (move c2-3 c2-4 up) (move c3-3 c2-3 left) (move c4-3 c3-3 left) (move c5-3 c4-3 left) true. Τέλος, τα αποτελέσματα που παράγονται από την εκτέλεση του planner για το πρόβλημα (sokobandomain.txt, sokoban-problem3.txt) είναι: (Παρατίθενται μόνο τα τελικά αποτελέσματα, γιατί μόνο τα αποτελέσματα από την τελευταία αναδρομική κλήση του κατηγορήματος ξεπερνούν τις 10 σελίδες Αν ζητηθεί μπορώ να συμπεριλάβω και τα υπόλοιπα, αλλιώς μπορείτε να τα δείτε και εάν εκτελέσετε τον planner) *Debug Information* A call to dfs/3 has just been performed
22 (Τα αποτελέσματα από την τελευταία εκτέλεση παραλείπονται λόγω πάρα πολύ μεγάλης έκτασης) Solution found! Domain name: sokoban Problem name: sokoban3 Time: sec Search length: 1358 nodes Solution length: 30 actions Solution: (push c2-3 c3-3 c4-3 right box1) (push c1-3 c2-3 c3-3 right box1) (move c1-2 c1-3 up) (move c2-2 c1-2 left) (push c2-1 c2-2 c2-3 up box1) (move c1-1 c2-1 right) (move c1-2 c1-1 down) (move c1-3 c1-2 down) (move c2-3 c1-3 left) (move c3-3 c2-3 left) (move c4-3 c3-3 left) (push c3-3 c4-3 c5-3 right box2) (move c3-2 c3-3 up) (push c4-2 c3-2 c2-2 left box1) (push c5-2 c4-2 c3-2 left box1) (move c5-3 c5-2 down) (push c6-3 c5-3 c4-3 left box2) (move c6-4 c6-3 down) (move c5-4 c6-4 right) (move c4-4 c5-4 right) (move c4-3 c4-4 up) (push c3-3 c4-3 c5-3 right box2) (push c2-3 c3-3 c4-3 right box2) (push c1-3 c2-3 c3-3 right box2) (move c1-2 c1-3 up) (move c2-2 c1-2 left) (move c3-2 c2-2 left) (move c3-3 c3-2 down) (push c4-3 c3-3 c2-3 left box2) (push c4-4 c4-3 c4-2 down box1) True **Τέλος, αξίζει να σημειωθεί ότι οι κινήσεις μέσω των οποίων φτάνουμε στο στόχο εμφανίζονται από την τελευταία προς την αρχική. Αυτό δεν επηρεάζει το αποτέλεσμα μιας και η λεξικογραφική ταξινόμηση των καταστάσεων γίνεται με βάση μόνο το State ως string όπως χαρακτηριστικά αναφέρεται και στη 2 η άσκηση της 1 ης εργασίας. Εύκολα θα μπορούσαμε να επεκτείναμε την λίστα ListOfActions βάζοντας την καινούργια ενέργεια (NewAction) κάθε φορά στο τέλος της CurrentListOfActions και όχι στην αρχή της, παίρνοντας έτσι την αντίστροφη σειρά στο Solution. Άσκηση 3(iii) 3(i). Time (sec) sokoban-problem1 sokoban-problem2 sokoban-problem3 Search Length (nodes) Solution Length (actions) Time (sec) Search Length (nodes) Solution Length (actions) Time (sec) Search Length (nodes) Solution Length (actions) dfs/ (ii). astar/
23 Παρατηρήσεις: 1) Search Length: Σε καθένα από τα προβλήματα παρατηρούμε ότι το μήκος της λίστας των καταστάσεων που εξερευνήθηκαν είναι ίδιο ή μικρότερο για την περίπτωση που η αναζήτηση έγινε με τον αλγόριθμο AStarPlanner σε αντίθεση με τον DepthFirstPlanner. Αυτό συμβαίνει γιατί η dfs αναζήτηση είναι πιθανό να "μπερδεύεται" και να αναζητά τη λύση ανάμεσα σε χιλιάδες μονοπάτια καταστάσεων και άρα να αργεί πολύ μέχρις ότου να πέσει στο σωστό μονοπάτι, το οποίο με τη σειρά του εξαρτάται από τις λεπτομέρειες της υλοποίησης που καθορίζουν πώς τοποθετούνται οι διάδοχες καταστάσεις στην αρχή της OpenStates, όπου εδώ: i. ανάμεσα σε δύο λεκτικά με τον ίδιο αριθμό ορισμάτων καθορίζεται από την prolog να προηγείται αυτό που προηγείται λεξικογραφικά αν συγκρίνουμε τα δυο λεκτικά σαν strings. Π.χ., το Clear(C) προηγείται του OnTable(A), και το On(A,B) προηγείται του On(A,C) και ii. ανάμεσα σε δύο λεκτικά με διαφορετικό αριθμό ορισμάτων να προηγείται αυτό με τα λιγότερα ορίσματα. Π.χ., το GripEmpty που δεν έχει κανένα όρισμα προηγείται του Clear(C) το οποίο προηγείται του On(A,B). Από την άλλη πλευρά η astar αναζήτηση επειδή κάνει αξιολόγηση κάθε φορά σε όλες τις καταστάσεις και τις ταξινομεί ανάλογα με μία ευρετική συνάρτηση (που στη συγκεκριμένη περίπτωση εξαρτάται από το μήκος της λίστας των ενεργειών και την ικανοποίηση μέρους του τελικού στόχου). Συνεπώς η astar επιλέγει έξυπνα την επόμενη κατάσταση που θα εξερευνήσει ώστε να πλησιάζει στο στόχο σε κάθε επόμενο βήμα και μάλιστα με τις λιγότερες δυνατές κινήσεις. Έτσι προφανώς, σε όλες τις περιπτώσεις η astar θα βρει την καλύτερη λύση και στις περισσότερες περιπτώσεις θα βρει τη λύση ψάχνοντας λιγότερους κόμβους, εν αντιθέσει με την dfs. Εκτός και εάν η τελευταία τύχει και βρει λύση στα πρώτα μονοπάτια που θα πάει να αναζητήσει. 2) Solution Length: Και σε αυτό το στατιστικό στοιχείο παρατηρούμε ότι η AStarPlanner είναι καλύτερη από την DepthFirstPlanner. Αυτό οφείλεται στο λόγο ότι η dfs κάνει ταξινόμηση μόνο στα καινούργια OpenStates τα οποία στη συνέχεια απλά τα βάζει μπροστά από τα παλιότερα OpenStates που είχαν βρεθεί από παλιότερες ενέργειες. Λειτουργεί ακριβώς δηλαδή όπως πρέπει να ορίζεται η αναζήτηση πρώτα σε βάθος(dfs), πρώτα ψάχνει εντελώς ένα μονοπάτι και έπειτα αν δεν βρει λύση σε αυτό τότε συνεχίζει την αναζήτηση σε κάποιο άλλο μονοπάτι. Αντίθετα, η astar όπως είπαμε λόγω του τρόπου που λειτουργεί η prolog και τον οποίο περιγράψαμε παραπάνω, κάνει μία αρχική ταξινόμηση στα OpenStates με τον ίδιο τρόπο που κάνει και η dfs, αλλά έπειτα ξανακάνει ταξινόμηση σε όλες τις καταστάσεις (παλιές και καινούργιες) με βάση μία συνάρτηση αξιολόγησης η οποία όπως προαναφέραμε εξαρτάται από το μήκος της λίστας των ενεργειών και την ικανοποίηση μέρους του τελικού στόχου. Έτσι πάντα διαλέγει την πιο σύντομη και συνάμα κοντινή κίνηση στο στόχο. Σε αυτό οφείλεται και ότι για παράδειγμα στο sokoban-problem3 η astar βρίσκει λύση σε λιγότερες από το 1/3 κινήσεις από αυτές που βρίσκει λύση η dfs. Πιο αναλυτικά, αυτό συμβαίνει γιατί η dfs ακολούθησε μία πολύ μεγάλη διαδρομή μέσω ενός ή περισσότερων λάθος μονοπατιών από τα οποία τελικά κατέληξε στο τελευταίο μονοπάτι που ακολούθησε να βρει λύση αλλά μέσω πολλών κινήσεων. Από την άλλη πλευρά η astar αξιολόγησε σωστά την κάθε κίνησή της και ακολούθησε σίγουρα κάποιο διαφορετικό και πολύ πιο σύντομο μονοπάτι για να βρει λύση. 3) Time: Στα δύο δυσκολότερα προβλήματα η astar επειδή όπως είπαμε στις προηγούμενες παρατηρήσεις ακολούθησε σωστότερα μονοπάτια και άρα εξερεύνησε λιγότερους κόμβους για να φτάσει στο στόχο έκανε λιγότερο χρόνο από την αναζήτηση με dfs. Παρατηρούμε όμως ότι για το πρόβλημα sokobanproblem1 όπου έχουν εξερευνηθεί ακριβώς οι ίδιες σε αριθμό καταστάσεις και με τους δύο αλγορίθμους η αναζήτηση με dfs είναι ταχύτερη από την αναζήτηση με astar. Αυτό οφείλεται κυρίως γιατί στο τέλος του αλγορίθμου της αναζήτησης astar γίνεται άλλη μία ταξινόμηση και μάλιστα σε όλα τα στοιχεία της λίστας OpenStates με αποτέλεσμα μία μικρή καθυστέρηση. Τέλος, μικρό μέρος της καθυστέρησης οφείλεται και στις επιπλέον εντολές που εκτελούνται εντός του κατηγορήματος iteration που κατασκευάσαμε για να βρίσκει ο αλγόριθμος το evaluation του κάθε νέου NewOpenState μετά από την εκτέλεση κάθε ενέργειας.
24 Άσκηση 4 Παρατηρήσεις: 1) Παρατηρούμε όπως εξηγήσαμε και στο προηγούμενο ερώτημα της προηγούμενης άσκηση ότι όταν τρέξουμε το πρόβλημα simplegame-problem1.txt με τον planner που κάνει dfs αναζήτηση σε σχέση με τον planner που κάνει astar αναζήτηση θα δούμε ότι θα βρεθεί λύση πολύ πιο γρήγορα με τον astar σε σχέση με τον dfs. Οι λόγοι είναι ακριβώς αυτοί που περιγράψαμε στο προηγούμενο ερώτημα. 2) Επίσης παρατηρούμε ότι και ο planner_astar που κατασκευάσαμε και το εκτελέσιμο blackbox μας δίνουν ακριβώς την ίδια λύση στον ίδιο περίπου χρόνο, οπότε μάλλον η σχεδίαση του planner μας έγινε σωστά. Σχόλια: 1) Στην σχεδίαση την ενέργειας (:action shoot :parameters (?locationnpc?locplayer?direction?gun) :precondition (and (npc-at?locationnpc) (npc-facing?direction) (player-at?locplayer) (adjacent?locationnpc?locplayer?direction) (npc-holding?gun) (gun?gun)) :effect (player-down)) ) προσθέσαμε ακόμα το precondition με το κόκκινο χρώμα ώστε να μην πυροβολεί το npc τον παίχτη από διαγώνια θέση. 2) Τέλος, για άλλη μία φορά αξίζει να σημειωθεί ότι οι κινήσεις μέσω των οποίων φτάνουμε στο στόχο εμφανίζονται από την τελευταία προς την αρχική. Αυτό δεν επηρεάζει το αποτέλεσμα μιας και η λεξικογραφική ταξινόμηση των καταστάσεων γίνεται με βάση μόνο το State ως string όπως χαρακτηριστικά αναφέρεται και στη 2 η άσκηση της 1 ης εργασίας. Εύκολα θα μπορούσαμε να επεκτείναμε την λίστα ListOfActions βάζοντας την καινούργια ενέργεια (NewAction) κάθε φορά στο τέλος της CurrentListOfActions και όχι στην αρχή της, παίρνοντας έτσι την αντίστροφη σειρά στο Solution.
ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006
Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Ολοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα είναι μικρότεροι το 1000 εκτός αν ορίζεται διαφορετικά στη διατύπωση του προβλήματος. Διάρκεια: 3,5 ώρες Καλή
ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007
Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Αν κάπου κάνετε κάποιες υποθέσεις να αναφερθούν στη σχετική ερώτηση. Όλα τα αρχεία που αναφέρονται στα προβλήματα βρίσκονται στον ίδιο φάκελο με το εκτελέσιμο
HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:
HOMEWORK 4 Problem a For the fast loading case, we want to derive the relationship between P zz and λ z. We know that the nominal stress is expressed as: P zz = ψ λ z where λ z = λ λ z. Therefore, applying
2 Composition. Invertible Mappings
Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan Composition. Invertible Mappings In this section we discuss two procedures for creating new mappings from old ones, namely,
ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ EPL035: ΔΟΜΕΣ ΔΕΔΟΜΕΝΩΝ ΚΑΙ ΑΛΓΟΡΙΘΜΟΙ
ΠΝΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΤΜΗΜ ΠΛΗΡΟΦΟΡΙΚΗΣ EPL035: ΔΟΜΣ ΔΔΟΜΝΩΝ ΚΙ ΛΓΟΡΙΘΜΟΙ ΗΜΡΟΜΗΝΙ: 14/11/2018 ΔΙΓΝΩΣΤΙΚΟ ΠΝΩ Σ ΔΝΔΡΙΚΣ ΔΟΜΣ ΚΙ ΓΡΦΟΥΣ Διάρκεια: 45 λεπτά Ονοματεπώνυμο:. ρ. Ταυτότητας:. ΒΘΜΟΛΟΓΙ ΣΚΗΣΗ ΒΘΜΟΣ
Αναζήτηση σε Γράφους. Μανόλης Κουμπαράκης. ΥΣ02 Τεχνητή Νοημοσύνη 1
Αναζήτηση σε Γράφους Μανόλης Κουμπαράκης ΥΣ02 Τεχνητή Νοημοσύνη 1 Πρόλογος Μέχρι τώρα έχουμε δει αλγόριθμους αναζήτησης για την περίπτωση που ο χώρος καταστάσεων είναι δένδρο (υπάρχει μία μόνο διαδρομή
HY380 Αλγόριθμοι και πολυπλοκότητα Hard Problems
HY380 Αλγόριθμοι και πολυπλοκότητα Hard Problems Ημερομηνία Παράδοσης: 0/1/017 την ώρα του μαθήματος ή με email: mkarabin@csd.uoc.gr Γενικές Οδηγίες α) Επιτρέπεται η αναζήτηση στο Internet και στην βιβλιοθήκη
C.S. 430 Assignment 6, Sample Solutions
C.S. 430 Assignment 6, Sample Solutions Paul Liu November 15, 2007 Note that these are sample solutions only; in many cases there were many acceptable answers. 1 Reynolds Problem 10.1 1.1 Normal-order
Physical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible.
B-Trees Index files can become quite large for large main files Indices on index files are possible 3 rd -level index 2 nd -level index 1 st -level index Main file 1 The 1 st -level index consists of pairs
Οδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook
Οδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook Βήμα 1: Step 1: Βρείτε το βιβλίο που θα θέλατε να αγοράσετε και πατήστε Add to Cart, για να το προσθέσετε στο καλάθι σας. Αυτόματα θα
derivation of the Laplacian from rectangular to spherical coordinates
derivation of the Laplacian from rectangular to spherical coordinates swapnizzle 03-03- :5:43 We begin by recognizing the familiar conversion from rectangular to spherical coordinates (note that φ is used
Δημιουργία Λογαριασμού Διαχείρισης Business Telephony Create a Management Account for Business Telephony
Δημιουργία Λογαριασμού Διαχείρισης Business Telephony Create a Management Account for Business Telephony Ελληνικά Ι English 1/7 Δημιουργία Λογαριασμού Διαχείρισης Επιχειρηματικής Τηλεφωνίας μέσω της ιστοσελίδας
Section 9.2 Polar Equations and Graphs
180 Section 9. Polar Equations and Graphs In this section, we will be graphing polar equations on a polar grid. In the first few examples, we will write the polar equation in rectangular form to help identify
Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής
Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής Να γραφεί πρόγραμμα το οποίο δέχεται ως είσοδο μια ακολουθία S από n (n 40) ακέραιους αριθμούς και επιστρέφει ως έξοδο δύο ακολουθίες από θετικούς ακέραιους
ΜΥΥ105: Εισαγωγή στον Προγραμματισμό. Αναζήτηση και Ταξινόμηση Χειμερινό Εξάμηνο 2016
ΜΥΥ105: Εισαγωγή στον Προγραμματισμό Αναζήτηση και Ταξινόμηση Χειμερινό Εξάμηνο 2016 Αναζήτηση και Ταξινόμηση Βασικές λειτουργίες σε προγράμματα Αναζήτηση (searching): Βρες ένα ζητούμενο στοιχείο σε μια
Εγκατάσταση λογισμικού και αναβάθμιση συσκευής Device software installation and software upgrade
Για να ελέγξετε το λογισμικό που έχει τώρα η συσκευή κάντε κλικ Menu > Options > Device > About Device Versions. Στο πιο κάτω παράδειγμα η συσκευή έχει έκδοση λογισμικού 6.0.0.546 με πλατφόρμα 6.6.0.207.
EE512: Error Control Coding
EE512: Error Control Coding Solution for Assignment on Finite Fields February 16, 2007 1. (a) Addition and Multiplication tables for GF (5) and GF (7) are shown in Tables 1 and 2. + 0 1 2 3 4 0 0 1 2 3
Section 7.6 Double and Half Angle Formulas
09 Section 7. Double and Half Angle Fmulas To derive the double-angles fmulas, we will use the sum of two angles fmulas that we developed in the last section. We will let α θ and β θ: cos(θ) cos(θ + θ)
Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016
Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Dynamic types, Lambda calculus machines Apr 21 22, 2016 1 Dynamic types and contracts (a) To make sure you understand the
Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)
Phys460.nb 81 ψ n (t) is still the (same) eigenstate of H But for tdependent H. The answer is NO. 5.5.5. Solution for the tdependent Schrodinger s equation If we assume that at time t 0, the electron starts
Right Rear Door. Let's now finish the door hinge saga with the right rear door
Right Rear Door Let's now finish the door hinge saga with the right rear door You may have been already guessed my steps, so there is not much to describe in detail. Old upper one file:///c /Documents
The challenges of non-stable predicates
The challenges of non-stable predicates Consider a non-stable predicate Φ encoding, say, a safety property. We want to determine whether Φ holds for our program. The challenges of non-stable predicates
Section 8.3 Trigonometric Equations
99 Section 8. Trigonometric Equations Objective 1: Solve Equations Involving One Trigonometric Function. In this section and the next, we will exple how to solving equations involving trigonometric functions.
Areas and Lengths in Polar Coordinates
Kiryl Tsishchanka Areas and Lengths in Polar Coordinates In this section we develop the formula for the area of a region whose boundary is given by a polar equation. We need to use the formula for the
How to register an account with the Hellenic Community of Sheffield.
How to register an account with the Hellenic Community of Sheffield. (1) EN: Go to address GR: Πηγαίνετε στη διεύθυνση: http://www.helleniccommunityofsheffield.com (2) EN: At the bottom of the page, click
ΕΘΝΙΚΟ ΚΑΠΟΔΙΣΤΡΙΑΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΑΘΗΝΩΝ ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ ΚΑΙ ΤΗΛΕΠΙΚΟΙΝΩΝΙΩΝ
ΕΘΝΙΚΟ ΚΑΠΟΔΙΣΤΡΙΑΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΑΘΗΝΩΝ ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ ΚΑΙ ΤΗΛΕΠΙΚΟΙΝΩΝΙΩΝ ΤΕΧΝΗΤΗ ΝΟΗΜΟΣΥΝΗ Καθηγητής : Κουμπαράκης Μανόλης Ημ/νία παράδοσης: 11/01/2011 Ονομ/μο φοιτητή : Μπεγέτης Νικόλαος Α.Μ.:
CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS
CHAPTER 5 SOLVING EQUATIONS BY ITERATIVE METHODS EXERCISE 104 Page 8 1. Find the positive root of the equation x + 3x 5 = 0, correct to 3 significant figures, using the method of bisection. Let f(x) =
3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β
3.4 SUM AND DIFFERENCE FORMULAS Page Theorem cos(αβ cos α cos β -sin α cos(α-β cos α cos β sin α NOTE: cos(αβ cos α cos β cos(α-β cos α -cos β Proof of cos(α-β cos α cos β sin α Let s use a unit circle
ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ ΜΕ ΤΟ ΚΙΤ ΡΟΜΠΟΤΙΚΗΣ LEGO MINDSTORMS EV3
ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ ΜΕ ΤΟ ΚΙΤ ΡΟΜΠΟΤΙΚΗΣ LEGO MINDSTORMS EV3 Μάθημα 7ο: Επαναλαμβανόμενες ενέργειες (Loops) Σύλλογος Εκπαιδευτικών Πληροφορικής Χίου ΑΝΤΙΚΕΙΜΕΝΑ ΜΑΘΗΣΗΣ 1. Τι σημαίνει η επανάληψη 2. Πώς χρησιμοποιείται
The Simply Typed Lambda Calculus
Type Inference Instead of writing type annotations, can we use an algorithm to infer what the type annotations should be? That depends on the type system. For simple type systems the answer is yes, and
Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.
Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο The time integral of a force is referred to as impulse, is determined by and is obtained from: Newton s 2 nd Law of motion states that the action
Πανεπιστήμιο Δυτικής Μακεδονίας. Τμήμα Μηχανικών Πληροφορικής & Τηλεπικοινωνιών. Τεχνητή Νοημοσύνη. Ενότητα 2: Αναζήτηση (Search)
Τμήμα Μηχανικών Πληροφορικής & Τηλεπικοινωνιών Τεχνητή Νοημοσύνη Ενότητα 2: Αναζήτηση (Search) Αν. καθηγητής Στεργίου Κωνσταντίνος kstergiou@uowm.gr Τμήμα Μηχανικών Πληροφορικής και Τηλεπικοινωνιών Άδειες
Finite Field Problems: Solutions
Finite Field Problems: Solutions 1. Let f = x 2 +1 Z 11 [x] and let F = Z 11 [x]/(f), a field. Let Solution: F =11 2 = 121, so F = 121 1 = 120. The possible orders are the divisors of 120. Solution: The
Areas and Lengths in Polar Coordinates
Kiryl Tsishchanka Areas and Lengths in Polar Coordinates In this section we develop the formula for the area of a region whose boundary is given by a polar equation. We need to use the formula for the
ΜΥΥ105: Εισαγωγή στον Προγραµµατισµό. Αναζήτηση και Ταξινόµηση Χειµερινό Εξάµηνο 2014
ΜΥΥ105: Εισαγωγή στον Προγραµµατισµό Αναζήτηση και Ταξινόµηση Χειµερινό Εξάµηνο 2014 Αναζήτηση και Ταξινόµηση Βασικές λειτουργίες σε προγράµµατα Αναζήτηση (searching): Βρες ένα ζητούµενο στοιχείο σε µια
Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.
Exercises 0 More exercises are available in Elementary Differential Equations. If you have a problem to solve any of them, feel free to come to office hour. Problem Find a fundamental matrix of the given
Homework 3 Solutions
Homework 3 Solutions Igor Yanovsky (Math 151A TA) Problem 1: Compute the absolute error and relative error in approximations of p by p. (Use calculator!) a) p π, p 22/7; b) p π, p 3.141. Solution: For
FSM Toolkit Exercises
ΠΟΛΥΤΕΧΝΕΙΟ ΚΡΗΤΗΣ Τμήμα Ηλεκτρονικών Μηχανικών και Μηχανικών Υπολογιστών Τομέας Τηλεπικοινωνιών Αναπληρωτής Καθηγητής: Αλέξανδρος Ποταμιάνος Ονοματεπώνυμο: Α Μ : ΗΜΕΡΟΜΗΝΙΑ: ΤΗΛ 413 : Συστήματα Επικοινωνίας
9.09. # 1. Area inside the oval limaçon r = cos θ. To graph, start with θ = 0 so r = 6. Compute dr
9.9 #. Area inside the oval limaçon r = + cos. To graph, start with = so r =. Compute d = sin. Interesting points are where d vanishes, or at =,,, etc. For these values of we compute r:,,, and the values
HY150a Φροντιστήριο 3 24/11/2017
HY150a Φροντιστήριο 3 24/11/2017 1 Assignment 3 Overview Το πρόγραμμα ζητείται να διαβάζει μια λίστα δεδομένων που περιγράφει τα διαθέσιμα τμήματα μνήμης (blocks) ενός ΗΥ. Το πρόγραμμα ζητείται να μεταφορτώνει
Srednicki Chapter 55
Srednicki Chapter 55 QFT Problems & Solutions A. George August 3, 03 Srednicki 55.. Use equations 55.3-55.0 and A i, A j ] = Π i, Π j ] = 0 (at equal times) to verify equations 55.-55.3. This is our third
SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions
SCHOOL OF MATHEMATICAL SCIENCES GLMA Linear Mathematics 00- Examination Solutions. (a) i. ( + 5i)( i) = (6 + 5) + (5 )i = + i. Real part is, imaginary part is. (b) ii. + 5i i ( + 5i)( + i) = ( i)( + i)
Ευφυής Προγραμματισμός
Ευφυής Προγραμματισμός Ιωάννης Χατζηλυγερούδης Πολυτεχνική Σχολή Τμήμα Μηχανικών Η/Υ & Πληροφορικής Περιεχόμενα ενότητας Συναρτήσεις-Δομές Ελέγχου : 1. Συναρτήσεις Χρήστη 2. Έλεγχος Ροής Προγράμματος 3.
Partial Trace and Partial Transpose
Partial Trace and Partial Transpose by José Luis Gómez-Muñoz http://homepage.cem.itesm.mx/lgomez/quantum/ jose.luis.gomez@itesm.mx This document is based on suggestions by Anirban Das Introduction This
ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011
Διάρκεια Διαγωνισμού: 3 ώρες Απαντήστε όλες τις ερωτήσεις Μέγιστο Βάρος (20 Μονάδες) Δίνεται ένα σύνολο από N σφαιρίδια τα οποία δεν έχουν όλα το ίδιο βάρος μεταξύ τους και ένα κουτί που αντέχει μέχρι
Λειτουργικά. Συστήματα Ι. Φ ρ ο ν τ ι σ τ ή ρ ι ο. Αριστείδης Ηλίας. Εργαστήριο Ηλεκτρονικών Υπολογιστών
Λειτουργικά Αριστείδης Ηλίας Συστήματα Ι Φ ρ ο ν τ ι σ τ ή ρ ι ο Shell Scripting Εισαγωγή Ένα shell script είναι μια λίστα εντολών που εκτελούνται ακολουθιακά Εκτελούνται ανάλογα με το κέλυφος και για
Βυζαντινός Ρεπαντής Κολλέγιο Αθηνών 2010
Βυζαντινός Ρεπαντής Κολλέγιο Αθηνών 2010 Δημιουργία ενός απλού παιχνιδιού με το Gamemaker (μετάφραση από το http://www.stuffucanuse.com/downloads/gamemaker-introductionlessons/free_game_downloads_gamemaker.htm)
6.3 Forecasting ARMA processes
122 CHAPTER 6. ARMA MODELS 6.3 Forecasting ARMA processes The purpose of forecasting is to predict future values of a TS based on the data collected to the present. In this section we will discuss a linear
Εισαγωγή στον Προγραμματισμό
Εισαγωγή στον Προγραμματισμό Έλεγχος Δημήτρης Μιχαήλ Τμήμα Πληροφορικής και Τηλεματικής Χαροκόπειο Πανεπιστήμιο Ακ. Έτος 2012-2013 Σχεσιακοί Τελεστές και Ισότητας Ένα πρόγραμμα εκτός από αριθμητικές πράξεις
Συστήματα Διαχείρισης Βάσεων Δεδομένων
ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Συστήματα Διαχείρισης Βάσεων Δεδομένων Φροντιστήριο 9: Transactions - part 1 Δημήτρης Πλεξουσάκης Τμήμα Επιστήμης Υπολογιστών Tutorial on Undo, Redo and Undo/Redo
Matrices and Determinants
Matrices and Determinants SUBJECTIVE PROBLEMS: Q 1. For what value of k do the following system of equations possess a non-trivial (i.e., not all zero) solution over the set of rationals Q? x + ky + 3z
Τυπικός ορισμός και επίλυση προβλημάτων με την χρήση του search.py (Ιεραπόστολοι & Κανίβαλοι) Γαρμπής Γιώργος
Τυπικός ορισμός και επίλυση προβλημάτων με την χρήση του search.py (Ιεραπόστολοι & Κανίβαλοι) Γαρμπής Γιώργος ggarbis@di.uoa.gr 21 Νοεμβρίου 2011 Πως ορίζουμε τυπικά ένα πρόβλημα; Αρχική Κατάσταση: Από
Δίκτυα Επικοινωνιών ΙΙ: OSPF Configuration
Δίκτυα Επικοινωνιών ΙΙ: OSPF Configuration Δρ. Απόστολος Γκάμας Διδάσκων 407/80 gkamas@uop.gr Δίκτυα Επικοινωνιών ΙΙ Διαφάνεια 1 1 Dynamic Routing Configuration Router (config) # router protocol [ keyword
ΤΜΗΜΑ ΔΙΟΙΚΗΣΗΣ ΕΠΙΧΕΙΡΗΣΕΩΝ
ΤΕΙ Δυτικής Μακεδονίας ΤΜΗΜΑ ΔΙΟΙΚΗΣΗΣ ΕΠΙΧΕΙΡΗΣΕΩΝ 2015-2016 Τεχνητή Νοημοσύνη Επίλυση προβλημάτων με αναζήτηση Διδάσκων: Τσίπουρας Μάρκος Εκπαιδευτικό Υλικό: Τσίπουρας Μάρκος http://ai.uom.gr/aima/ 2
Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1
Eon : Fall 8 Suggested Solutions to Problem Set 8 Email questions or omments to Dan Fetter Problem. Let X be a salar with density f(x, θ) (θx + θ) [ x ] with θ. (a) Find the most powerful level α test
Example Sheet 3 Solutions
Example Sheet 3 Solutions. i Regular Sturm-Liouville. ii Singular Sturm-Liouville mixed boundary conditions. iii Not Sturm-Liouville ODE is not in Sturm-Liouville form. iv Regular Sturm-Liouville note
Advanced Subsidiary Unit 1: Understanding and Written Response
Write your name here Surname Other names Edexcel GE entre Number andidate Number Greek dvanced Subsidiary Unit 1: Understanding and Written Response Thursday 16 May 2013 Morning Time: 2 hours 45 minutes
Σημειωματάαριο Δευτέρας 16 Οκτ. 2017
Σημειωματάαριο Δευτέρας 16 Οκτ. 2017 Λίστες και ανακύκλωση for Είδαμε στην αρχή (ξανά) μερικά βασικά πράγματα για λίστες. Λίστα είναι μια πεπερασμένη ακολουθία από αντικείμενα (αριθμούς, strings, άλλες
Δείκτες σε συναρτήσεις. Προγραμματισμός II 1
Δείκτες σε συναρτήσεις Προγραμματισμός II 1 lalis@inf.uth.gr Συνάρτηση Ομάδα εντολών που γράφουμε ξεχωριστά για να υλοποιήσουμε μια συγκεκριμένη λειτουργία για καλύτερη / πιο καθαρή δόμηση του κώδικα για
Basic Missions
www.hackthissite.org Basic Missions Προγουλάκης Νίκος Α.Μ.: 2582 2010-2011 (Ε) www.hackthissite.org 1 www.hackthissite.org www.hackthissite.org 2 www.hackthissite.org www.hackthissite.org 3 www.hackthissite.org
ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007
Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Όλοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα μικρότεροι του 10000 εκτός αν ορίζεται διαφορετικά στη διατύπωση του προβλήματος. Αν κάπου κάνετε κάποιες υποθέσεις
ΕΡΓΑΣΤΗΡΙΟ 9: Συμβολοσειρές και Ορίσματα Γραμμής Εντολής
ΕΡΓΑΣΤΗΡΙΟ 9: Συμβολοσειρές και Ορίσματα Γραμμής Εντολής Στο εργαστήριο αυτό θα δούμε πώς ορίζονται και πώς χρησιμοποιούνται οι συμβολοσειρές στην C. Επίσης, θα μελετήσουμε κάποιες από τις συναρτήσεις
Αλγόριθμοι Ταξινόμησης Bubble Sort Quick Sort. Αντρέας Δημοσθένους Καθηγητής Πληροφορικής Ολυμπιάδα 2012
Αλγόριθμοι Ταξινόμησης Bubble Sort Quick Sort Αντρέας Δημοσθένους Καθηγητής Πληροφορικής Ολυμπιάδα 2012 3 5 1 Ταξινόμηση - Sorting Πίνακας Α 1 3 5 5 3 1 Ταξινόμηση (Φθίνουσα) Χωρίς Ταξινόμηση Ταξινόμηση
Solutions to Exercise Sheet 5
Solutions to Eercise Sheet 5 jacques@ucsd.edu. Let X and Y be random variables with joint pdf f(, y) = 3y( + y) where and y. Determine each of the following probabilities. Solutions. a. P (X ). b. P (X
Ειδικά θέματα Αλγορίθμων και Δομών Δεδομένων (ΠΛΕ073) Απαντήσεις 1 ου Σετ Ασκήσεων
Ειδικά θέματα Αλγορίθμων και Δομών Δεδομένων (ΠΛΕ073) Απαντήσεις 1 ου Σετ Ασκήσεων Άσκηση 1 α) Η δομή σταθμισμένης ένωσης με συμπίεση διαδρομής μπορεί να τροποποιηθεί πολύ εύκολα ώστε να υποστηρίζει τις
Concrete Mathematics Exercises from 30 September 2016
Concrete Mathematics Exercises from 30 September 2016 Silvio Capobianco Exercise 1.7 Let H(n) = J(n + 1) J(n). Equation (1.8) tells us that H(2n) = 2, and H(2n+1) = J(2n+2) J(2n+1) = (2J(n+1) 1) (2J(n)+1)
ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΣΧΟΛΗ ΓΕΩΤΕΧΝΙΚΩΝ ΕΠΙΣΤΗΜΩΝ ΚΑΙ ΔΙΑΧΕΙΡΙΣΗΣ ΠΕΡΙΒΑΛΛΟΝΤΟΣ. Πτυχιακή εργασία
ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΣΧΟΛΗ ΓΕΩΤΕΧΝΙΚΩΝ ΕΠΙΣΤΗΜΩΝ ΚΑΙ ΔΙΑΧΕΙΡΙΣΗΣ ΠΕΡΙΒΑΛΛΟΝΤΟΣ Πτυχιακή εργασία ΑΝΑΛΥΣΗ ΚΟΣΤΟΥΣ-ΟΦΕΛΟΥΣ ΓΙΑ ΤΗ ΔΙΕΙΣΔΥΣΗ ΤΩΝ ΑΝΑΝΕΩΣΙΜΩΝ ΠΗΓΩΝ ΕΝΕΡΓΕΙΑΣ ΣΤΗΝ ΚΥΠΡΟ ΜΕΧΡΙ ΤΟ 2030
Chap. 6 Pushdown Automata
Chap. 6 Pushdown Automata 6.1 Definition of Pushdown Automata Example 6.1 L = {wcw R w (0+1) * } P c 0P0 1P1 1. Start at state q 0, push input symbol onto stack, and stay in q 0. 2. If input symbol is
ΑΛΓΟΡΙΘΜΙΚΕΣ ΜΕΘΟΔΟΙ ΒΕΛΤΙΣΤΟΠΟΙΗΣΗΣ
ΑΛΓΟΡΙΘΜΙΚΕΣ ΜΕΘΟΔΟΙ ΒΕΛΤΙΣΤΟΠΟΙΗΣΗΣ ΚΟΥΛΙΝΑΣ ΓΕΩΡΓΙΟΣ Δρ. Μηχανικός Παραγωγής & Διοίκησης ΔΠΘ ΑΛΓΟΡΙΘΜΙΚΕΣ ΜΕΘΟΔΟΙ ΒΕΛΤΙΣΤΟΠΟΙΗΣΗΣ o ΔΙΑΛΕΞΕΙΣ ΜΑΘΗΜΑΤΟΣ ΔΕΥΤΕΡΑ 16.00-19.00 (Εργ. Υπ. Μαθ. Τμ. ΜΠΔ) oτρόπος
Inverse trigonometric functions & General Solution of Trigonometric Equations. ------------------ ----------------------------- -----------------
Inverse trigonometric functions & General Solution of Trigonometric Equations. 1. Sin ( ) = a) b) c) d) Ans b. Solution : Method 1. Ans a: 17 > 1 a) is rejected. w.k.t Sin ( sin ) = d is rejected. If sin
ΕΡΓΑΣΤΗΡΙΟ 5 ΣΗΜΕΙΩΣΕΙΣ
ΠΑΝΕΠΙΣΤΗΜΙΟ ΘΕΣΣΑΛΙΑΣ ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ ΑΚΑΔΗΜΑΪΚΟ ΕΤΟΣ 2017-2018 ΧΕΙΜΕΡΙΝΟ ΕΞΑΜΗΝΟ ΜΑΘΗΜΑ: ΔΟΜΕΣ ΔΕΔΟΜΕΝΩΝ Ουρές ΕΡΓΑΣΤΗΡΙΟ 5 ΣΗΜΕΙΩΣΕΙΣ Μια ουρά αποτελεί μια δομή δεδομένων στη λογική του First-in
Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in
Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in : tail in X, head in A nowhere-zero Γ-flow is a Γ-circulation such that
Ε ανάληψη. Ορισµοί της Τεχνητής Νοηµοσύνης (ΤΝ) Καταβολές. Ιστορική αναδροµή. Πράκτορες. Περιβάλλοντα. κριτήρια νοηµοσύνης
ΠΛΗ 405 Τεχνητή Νοηµοσύνη Αναζήτηση Search Τµήµα Ηλεκτρονικών Μηχανικών και Μηχανικών Υ ολογιστών Πολυτεχνείο Κρήτης Ε ανάληψη Ορισµοί της Τεχνητής Νοηµοσύνης (ΤΝ) κριτήρια νοηµοσύνης Καταβολές συνεισφορά
ΧΑΡΟΚΟΠΕΙΟ ΠΑΝΕΠΙΣΤΗΜΙΟ
ΧΑΡΟΚΟΠΕΙΟ ΠΑΝΕΠΙΣΤΗΜΙΟ Τμημα Πληροφορικης και Τηλεματικης Τσάμη Παναγιώτα ΑΜ: 20833 ΚΑΤΑΝΕΜΗΜΕΝΑ ΣΥΣΤΗΜΑΤΑ Άσκηση 1 Αθήνα 13-12-2011 Αναφορά Ενότητα 1 A Δημιουργήστε στο φλοιό 3 εντολές (alias) που η
Ευφυής Προγραμματισμός
Ευφυής Προγραμματισμός Ενότητα 3: Ειδικές Παράμετροι-Είσοδος & Έξοδος Ιωάννης Χατζηλυγερούδης Πολυτεχνική Σχολή Τμήμα Μηχανικών Η/Υ & Πληροφορικής Περιεχόμενα ενότητας Ειδικές Παράμετροι-Είσοδος & Έξοδος
Εργαστήριο 7: Ο αλγόριθμος ταξινόμησης Radix Sort
Εργαστήριο 7: Ο αλγόριθμος ταξινόμησης Radix Sort Στην ενότητα αυτή θα μελετηθούν τα εξής επιμέρους θέματα: -Ο αλγόριθμος ταξινόμησης Radix Sort -Δυο εκδοχές: Most Significant Digit (MSD) και Least Significant
ΤΕΧΝΙΚΕΣ ΑΝΤΙΚΕΙΜΕΝΟΣΤΡΑΦΟΥΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΥ. Αντικείμενα με πίνακες. Constructors. Υλοποίηση Στοίβας
ΤΕΧΝΙΚΕΣ ΑΝΤΙΚΕΙΜΕΝΟΣΤΡΑΦΟΥΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΥ Αντικείμενα με πίνακες. Constructors. Υλοποίηση Στοίβας Στην άσκηση αυτή θα υλοποιήσετε μια κλάση Geometric η οποία διαχειρίζεται μια γεωμετρική ακολουθία ακεραίων
Προγραμματισμός ΙI (Θ)
Τεχνολογικό Εκπαιδευτικό Ίδρυμα Κεντρικής Μακεδονίας - Σέρρες Τμήμα Μηχανικών Πληροφορικής Προγραμματισμός ΙI (Θ) Δρ. Δημήτρης Βαρσάμης Επίκουρος Καθηγητής Μάρτιος 2017 Δρ. Δημήτρης Βαρσάμης Μάρτιος 2017
Overview. Transition Semantics. Configurations and the transition relation. Executions and computation
Overview Transition Semantics Configurations and the transition relation Executions and computation Inference rules for small-step structural operational semantics for the simple imperative language Transition
Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο
Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων Εξάμηνο 7 ο Procedures and Functions Stored procedures and functions are named blocks of code that enable you to group and organize a series of SQL and PL/SQL
Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο
Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων Εξάμηνο 7 ο Oracle SQL Developer An Oracle Database stores and organizes information. Oracle SQL Developer is a tool for accessing and maintaining the data
ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ. ΕΠΛ342: Βάσεις Δεδομένων. Χειμερινό Εξάμηνο Φροντιστήριο 10 ΛΥΣΕΙΣ. Επερωτήσεις SQL
ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ ΕΠΛ342: Βάσεις Δεδομένων Χειμερινό Εξάμηνο 2013 Φροντιστήριο 10 ΛΥΣΕΙΣ Επερωτήσεις SQL Άσκηση 1 Για το ακόλουθο σχήμα Suppliers(sid, sname, address) Parts(pid, pname,
Τεχνητή Νοημοσύνη Ι. Εργαστηριακή Άσκηση 4-6. Σγάρμπας Κυριάκος. Τμήμα Ηλεκτρολόγων Μηχανικών και Τεχνολογίας Υπολογιστων
Τεχνητή Νοημοσύνη Ι Εργαστηριακή Άσκηση 4-6 Σγάρμπας Κυριάκος Τμήμα Ηλεκτρολόγων Μηχανικών και Τεχνολογίας Υπολογιστων ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ - ΠΟΛΥΤΕΧΝΙΚΗ ΣΧΟΛΗ ΤΜΗΜΑ ΗΛΕΚΤΡΟΛΟΓΩΝ ΜΗΧΑΝΙΚΩΝ & ΤΕΧΝΟΛΟΓΙΑΣ
ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω
0 1 2 3 4 5 6 ω ω + 1 ω + 2 ω + 3 ω + 4 ω2 ω2 + 1 ω2 + 2 ω2 + 3 ω3 ω3 + 1 ω3 + 2 ω4 ω4 + 1 ω5 ω 2 ω 2 + 1 ω 2 + 2 ω 2 + ω ω 2 + ω + 1 ω 2 + ω2 ω 2 2 ω 2 2 + 1 ω 2 2 + ω ω 2 3 ω 3 ω 3 + 1 ω 3 + ω ω 3 +
Homework 8 Model Solution Section
MATH 004 Homework Solution Homework 8 Model Solution Section 14.5 14.6. 14.5. Use the Chain Rule to find dz where z cosx + 4y), x 5t 4, y 1 t. dz dx + dy y sinx + 4y)0t + 4) sinx + 4y) 1t ) 0t + 4t ) sinx
Αλγόριθμοι και Δομές Δεδομένων (IΙ) (γράφοι και δένδρα)
Ιόνιο Πανεπιστήμιο Τμήμα Πληροφορικής Εισαγωγή στην Επιστήμη των Υπολογιστών 2016-17 Αλγόριθμοι και Δομές Δεδομένων (IΙ) (γράφοι και δένδρα) http://mixstef.github.io/courses/csintro/ Μ.Στεφανιδάκης Αφηρημένες
Lecture 15 - Root System Axiomatics
Lecture 15 - Root System Axiomatics Nov 1, 01 In this lecture we examine root systems from an axiomatic point of view. 1 Reflections If v R n, then it determines a hyperplane, denoted P v, through the
Bayesian statistics. DS GA 1002 Probability and Statistics for Data Science.
Bayesian statistics DS GA 1002 Probability and Statistics for Data Science http://www.cims.nyu.edu/~cfgranda/pages/dsga1002_fall17 Carlos Fernandez-Granda Frequentist vs Bayesian statistics In frequentist
ΤΕΧΝΙΚΕΣ ΑΝΤΙΚΕΙΜΕΝΟΣΤΡΑΦΟΥΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΥ. Πίνακες Κλάσεις και Αντικείμενα
ΤΕΧΝΙΚΕΣ ΑΝΤΙΚΕΙΜΕΝΟΣΤΡΑΦΟΥΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΥ Πίνακες Κλάσεις και Αντικείμενα Μαθήματα από το πρώτο εργαστήριο Δημιουργία αντικειμένου Scanner Scanner input = new Scanner(System.in); Το αντικείμενο input
Ευφυής Προγραμματισμός
Ευφυής Προγραμματισμός Ενότητα 6: Προβλήματα ΤΝ και Lisp Ιωάννης Χατζηλυγερούδης Πολυτεχνική Σχολή Τμήμα Μηχανικών Η/Υ & Πληροφορικής Περιεχόμενα ενότητας Προβλήματα ΤΝ και Lisp 1. Αναζήτηση και Στρατηγικές
Assalamu `alaikum wr. wb.
LUMP SUM Assalamu `alaikum wr. wb. LUMP SUM Wassalamu alaikum wr. wb. Assalamu `alaikum wr. wb. LUMP SUM Wassalamu alaikum wr. wb. LUMP SUM Lump sum lump sum lump sum. lump sum fixed price lump sum lump
ΣΧΕΔΙΑΣΜΟΣ ΕΠΙΓΕΙΟΥ ΣΥΣΤΗΜΑΤΟΣ ΑΛΥΣΟΚΙΝΗΣΗΣ ΓΙΑ ΜΕΤΑΦΟΡΑ ΤΡΟΛΕΪ
ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΣΧΟΛΗ ΜΗΧΑΝΙΚΗΣ ΚΑΙ ΤΕΧΝΟΛΟΓΙΑΣ Πτυχιακή εργασία ΣΧΕΔΙΑΣΜΟΣ ΕΠΙΓΕΙΟΥ ΣΥΣΤΗΜΑΤΟΣ ΑΛΥΣΟΚΙΝΗΣΗΣ ΓΙΑ ΜΕΤΑΦΟΡΑ ΤΡΟΛΕΪ Μάριος Σταυρίδης Λεμεσός, Ιούνιος 2017 ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ
lab13grades Άσκηση 2 -Σωστά απελευθερώνετε ολόκληρη τη λίστα και την κεφαλή
ΑΕΜ ΒΑΘΜΟΣ ΣΧΟΛΙΑ 00497 -Δεν ελέγχετε αν η createlist εκτελλέστικε σωστά και δεν τερµατίζετε το πρόγραµµα σε διαφορετική -Σωστά βρίσκετε το σηµείο στο οποίο πρέπει να προστεθεί ο κόµβος. -Σωστά τερµατίζετε
Ergasthriak 'Askhsh 5
Kefˆlaio 5 Ergasthriak 'Askhsh 5 Οπου θα εξηγήσουμε πώς μπορεί να γίνει εφικτή η επαναληπτική ε- κτέλεση μιας ενέργειας και πώς μια ενέργεια μπορεί να εφαρμοσθεί σε κάθε στοιχείο μιας λίστας στοιχείων.
k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +
Chapter 3. Fuzzy Arithmetic 3- Fuzzy arithmetic: ~Addition(+) and subtraction (-): Let A = [a and B = [b, b in R If x [a and y [b, b than x+y [a +b +b Symbolically,we write A(+)B = [a (+)[b, b = [a +b
Approximation of distance between locations on earth given by latitude and longitude
Approximation of distance between locations on earth given by latitude and longitude Jan Behrens 2012-12-31 In this paper we shall provide a method to approximate distances between two points on earth
ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?
Teko Classes IITJEE/AIEEE Maths by SUHAAG SIR, Bhopal, Ph (0755) 3 00 000 www.tekoclasses.com ANSWERSHEET (TOPIC DIFFERENTIAL CALCULUS) COLLECTION # Question Type A.Single Correct Type Q. (A) Sol least
Βασικά Στοιχεία Python 3
Βασικά Στοιχεία Python 3 Compiler Lecture s 1.0 documentation Βασικά Στοιχεία Python 3 Στη συνέχεια παρουσιάζονται ορισμένα ενδιαφέροντα στοιχεία της Python 3. Αυτό που ακολουθεί δεν είναι tutorial, αν
Strain gauge and rosettes
Strain gauge and rosettes Introduction A strain gauge is a device which is used to measure strain (deformation) on an object subjected to forces. Strain can be measured using various types of devices classified
#include <stdlib.h> Α. [-128,127] Β. [-127,128] Γ. [-128,128]
ΕΙΣΑΓΩΓΗ ΣΤΟΝ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟ Εξετάσεις Α Περιόδου 2017 (27/1/2017) ΟΝΟΜΑΤΕΠΩΝΥΜΟ:................................................................................ Α.Μ.:...............................................