Not logged in. · Lost password · Register

rappatoni
Member since Nov 2018
41 posts
Subject: Bonus Challenge: Integer Arithmetics in Prolog
In the SWISH-notebook https://swish.swi-prolog.org/p/Tutorial%201%20FAU%20AI%201… you can find an implementation of the integers suggested by a student.

Challenge: Fix the implementation so that ?int(p(s(zero)) returns true (10 Bonus Bonus Points). Define addition and multiplication for both naturals and integers (10 Bonus Bonus Points). Hint: part of the problem is that Prolog interprets p in the argument of neg as a function as opposed to the predicate p defined above (note that p is marked red for "not called"). To remedy this you may have to look into how to define higher-order predicates or meta-predicates in Prolog.

Rules:

You may work on the challenges alone or in a group. Groups of up to 3 may work on the challenges. Every member of a group gets the full amount of points. Maximally 3 submitted solutions can get points. First come, first serve.

Bonus Bonus Points are added to your Bonus Points but do not count towards the total of achievable bonus points:

ratio of bonus points = min((bonus points+bonus bonus points)/bonus points,1)

In other words you can make up for missed bonus points but not get more than 100% of the bonus points.

Be warned, I don't usually know the solution to a challenge so their difficulty may range from trivial to impossible or the question may not even be well-defined. In that case, if you provide a good explanation why the problem is hard/impossible, I may still give you the bonus points.
Johanno
johanno
Member since Mar 2017
19 posts
Unfortunately is the Website: https://swish.swi-prolog.org not available since a week.
Maybe you could reupload the Challange again.


Edit: its working again.
This post was edited on 2019-11-05, 15:21 by Johanno.
rappatoni
Member since Nov 2018
41 posts
Yes, unfortunately it has been offline intermittently. In light of this in my tutorial I have already retracted my recommendation to use it for homework.
tobias-14
Member since Oct 2017
63 posts
I didnt see this thread until now. I guess there are more than three submissions by now or is it still possible to submit this bonus challenge? (How can one know if its still possible? Will it be written here?)

I also can not find a note on where to submit bonus challenges.
rappatoni
Member since Nov 2018
41 posts
So far I have received zero submissions. I will update the thread when I get one. Submission is through email to me.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Datenschutz | Kontakt
Powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2011 by Yves Goergen