Correction to the Wednesday Tutorial Session & Bonus Challenge

Disclaimer: Dieser Thread wurde aus dem alten Forum importiert. Daher werden eventuell nicht alle Formatierungen richtig angezeigt. Der ursprüngliche Thread beginnt im zweiten Post dieses Threads.

Correction to the Wednesday Tutorial Session & Bonus Challenge
Hi all,

unfortunately, I had an error in the table I drew on the blackboard today. The order in which Iterative Deepening Search processes the fringe is the same as in DFS, which leads to a different order of visited nodes than the one I wrote. The tree and the correct order in which the nodes will be expanded(=visited) is now in my slides, available at https://gl.kwarc.info/teaching/AI/blob/master/Marius/uebung03/uebung03.pdf .

For all of you, I also have a little Bonus Challenge this week, where the intention is to remind you about the importance of runtime analysis and Big O:

Explain this comic strip to me!
Why does the mathematician say “Please don’t hack my emails!”?

Write about 5 sentence in an email to me (for the address see the slides above).
Since this is not really hard, only 5 Bonus Points will be given for a somewhat-“correct” answer.

Deadline for this is this Friday,16. November, 23:59, since you still have one week for assignment 3.


Just a hint for everyone who wants to save some debugging time:
The sort example from the tips.pl does not work for lists with elements that have the same costs. If it compares to items with the same cost, the second one will be dropped from the list

1 „Gefällt mir“

Oh yeah, I forgot about that.

I updated the file in the git, there is some way around that involving if constructs in Prolog:

comp_triples(Delta, (C1,_,_),(C2,_,_)):-
	(
		C1==C2 -> %checking if C1 has the same value as C2 , == does not unify
		Delta = >;
		compare(Delta,C1,C2)
	).

(What are we doing in here? If C1 and C2 have the same value we will constantly say that C1 is bigger, as it does not matter which is bigger in this case.)

You could also just use

comp_triples(Delta, (C1,_,_),(C2,_,_)):-
      C1==C2;
      compare(Delta,C1,C2).

But there, you can backtrack via spacebar or „;“ and get faulty results.

1 „Gefällt mir“

I wrote to your email-adress synced with the forum, hope that’s been correct.


Not exactly what I meant, but still OK.

(I intended that you have a look at my slides and find the address there, together with the suggestion to use PGP encryption)