人工智能prolog代写: Artificial Intelligence Assignments

Artificial Intelligence Assignments
Instructions: You will need to do one assignment out of these four assignments. Please discuss with the

faculty member for the assignment number assigned to you.

Code Documentation and General Requirements

Codes for all programming assignments should be well documented. A working program with no comments will receive only partial credit. Documentation entails writing a description of each predicate and rule as well as comments throughout the code to explain the program logic. Comments in Prolog begin with a /* and end with */. It is understood that some of the exercises in this programming assignment require extremely little code and will not require extensive comments. Nevertheless, comments describing recursions and helper predicates are required.

While few programming assignments pretend to mimic the “real” world, they may, nevertheless, contain some of the ambiguity that exists outside the classroom. If, for example, an assignment is amenable to differing interpretations, such that more than one algorithm may implement a correct solution to the assignment, it is incumbent upon the programmer to document not only the functionality of the algorithm (and more broadly his/her interpretation of the program requirements), but to articulate clearly the reasoning behind a particular choice of solution.

Around 10 page report has to be submitted along with the documented code.

Extra marks will be given for design, creativity and interactivity. You are free to work only using Prolog or using multiplatform to achieve the goal of your assignment. Multiplatforms may be Java+Prolog/C+Prolog/ or any other platform of your choice. The core logic should be implemented in Prolog. The project should be executable by the examiner. You have to submit a video recording of your assignment sample execution (you may use screen capture/recording app) also.

Assignment 1: Ten questions

In the two-people game of ten questions, one person is answerer and the other person is questioner. They decide one topic to confine the scope, say Olympics games. The answerer decides an Olympic game in his/her mind and does not reveal the game to the questioner. Questioner is supposed to ask a maximum of ten questions to guess the answer.

Design a prolog script that plays the role of an answerer. For example, queries can be related to:

  • Team size (2 for badminton doubles, 1 for swimming)
  • Number of teams in a game (2 for badminton doubles, many for swimming)
  • Arena type (court for badminton doubles, pool for swimming)
  • Play device (shuttle cock or racket for badminton doubles, water for swimming, ball or racket for

    tennis, javelin for javelin throw, etc.)

  • Game mode (knock out, timed)
  • Performance type (score, win)

    There should be only one form of query, for example: has(ball), has(pool), has(team), has(teamsize,2), has (teams_per_game, 2), etc. And one form of decision: is(badminton).

    Prolog script should be able to play the game 5 times, choosing a different game each time.