Not logged in. · Lost password · Register

 Member since Nov 2018 53 posts 2019-10-29, 12:04   #1   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 Member since Mar 2017 19 posts 2019-11-04, 20:32   #2   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.
 Member since Nov 2018 53 posts 2019-11-06, 13:37   #3   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.
 Member since Oct 2017 67 posts 2019-11-08, 20:13   #4   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.
 Member since Nov 2018 53 posts 2019-11-11, 11:49   #5   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: Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys:
Special characters:
Go to forum
Datenschutz | Kontakt