[Official] Assignment 4

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.

[Official] Assignment 4
Online at https://kwarc.info/teaching/AI/


regarding the teamsize of the tournament:

but studon allowes groups up to 4 people?


It also says “Site: The submission site will be opened later.”, so perhaps we won’t be using StudOn?


In the code comment for “consistent”, it says:

consistent(Cs,a) holds if the assignment a satisfies all constraints in Cs
for which a is defined

So I thought that a partial assignment is also consistent. But the following results in “false”:

consistent([
    constraint(1,2,[(4,2),(2,1),(0,0)]),
    constraint(2,3,[(0,0),(0,1),(1,1)])
  ], 
  [none, none, none]
).

Was this intentional? (So do I have to create my own predicate if I want to figure out if a partial assignment is consistent?)


In Problem 4.3 it says:

May unary constraints also be used additionally as long as the ternary constraint is gone? Or will using unary constraints result in minus points?


Unary constraints are generally redundant because they are equivalent to making the respective domain smaller.

So we usually assume that we only have domains and binary constraints (and possibly constraints of higher order).

Kalah team size
“as before, 3 people” is meant as “as before, 3 people with justified exceptions”


I will look at and discuss this in my tutorial tomorrow.

It’s quite possible that I have a few mistakes in my code.

Kalah maximum number of houses
It would be a useful information how many houses our agent has to play at most.
With this information it would be possible to create different heuristics for different sizes.
Can we therefore assume that, like last year, the maximum is 12 houses?


I’ve updated the notebook for 4.2 with a fixed definition of consistency and a partial test case for the n-queens problem.


Could it be that someone has started working on the template of 4.2 (in the online version)? It kinda looks like there are some approaches that seem to be a start of the solution, but now I am not sure if the template is still ‘official’ or usable like that…
Would be nice if this could be updated to some official version again.


Looks like it :slight_smile:

I’ve made one revision after my tutorial yesterday (fixed definition of consistency and added 4 queens example).

It looks like someone else finished the queens examples (good idea) and accidentally committed a little extra (mrv predicate).


Is it intentional that there is a undefined predicate “lCv” used in the “solve” predicate?


It seems someone accidentally overwrote the notebook instead of forking it.
I’ve removed that part.


To exercise 4.1:
Do all 5 courses take place on all three days (each course three times a week) or are the 5 courses split over the three days?

To exercise 4.2:
The source code in the notebook is apparently different today than it was yesterday evening, because we have three different versions of the document in our group.
Can you maybe upload the orginal source code in this post?


has anyone generated constraints for 8 queens yet?

else i might do that later and post here…

4.2
It’s quite optimistic to have a primary file which is writeable and around 150 students have access.
We already have to use Studon for our uploads so why not upload these files to studon?

1 „Gefällt mir“

The original code is always available in the history.


Solutions published