[SOLVED] Prolog Assignment 04

30 $

File Name: Prolog_Assignment_04.zip
File Size: 188.4 KB

5/5 - (1 vote)

Assignment 04 (Due: Monday, November 28, 2016, 11 : 59 : 00PM (Central Time)))

CSCE 322

Contents

  1. 1  Instructions 1 1.1 DataFileSpecification………………………………… 1 1.2 percentageSpaces(Game)………………………………. 2 1.3 columnsAndSpaces(Game)………………………………. 2 1.4 solveGame(Game,Vertical,Horizontal,SpacesAndValues) . . . . . . . . . . . . . . . . . 2 1.5 checkGame(Game,Vertical,Horizontal) (15% Extra Credit) . . . . . . . . . . . . . . . . . 2
  2. 2  Compilation & Execution 2
  3. 3  Webgrader Warning 2
  4. 4  Naming Conventions 3
  5. 5  Point Allocation 3
  6. 6  External Resources 3

List of Figures 1 Instructions

This assignment will use Prolog to extract certain information about the state of a variation of Greater Than Sudoku.

1.1 Data File Specification

The game will be represented as a list of lists of symbols.

1

[11,3,10,13,13,12,2,14,8,13,15,3,4,12]. [1,1,4,1,4,3,3,4,3,4,3,1,3,4]. [3,2,1,-].
[-,4,-,-].

[-,1,-,-]. [-,-,-,1]. [-1,1,1,-1]. [1,-1,-1,1]. [-1,1,1,-1]. [-1,-1,1]. [1,-1,-1]. [-1,1,1]. [1,1,-1].

1.2 percentageSpaces(Game)
The query percentageSpaces(Game) will be successful when the number of unfilled spaces in the game

does not exceed 25% of all spaces.

1.3 columnsAndSpaces(Game)

The query columnsAndSpaces(Game) will be successful when the game state has an odd number of columns and an odd number of open spaces in the game, or an even number of columns and an even number of open spaces in the game.

1.4 solveGame(Game,Vertical,Horizontal,SpacesAndValues)
The query solveGame(Game,Vertical,Horizontal,SpacesAndValues) will be successful when SpacesAndValues

is unified with the moves that would solve the current state of the game.

1.5 checkGame(Game,Vertical,Horizontal) (15% Extra Credit)
The query checkGame(Game,Vertical,Horizontal) will be successful when Game is a correctly solved

game according to the rules of Greater Than Sudoku.

2 Compilation & Execution

Your program will be tested on cse.unl.edu, using pl. hw04tests.pl will include test cases for testing your program. You can run the test cases with the commands:

[hw04tests].loadHelpers.part01.

3 Webgrader Warning

Prolog programs can take some time to run. The webgrader is limiting individual processes to 5 minutes.

Page 2

4 Naming Conventions

You will be submitting at least 3 .pl files. The filenames should be csce322hw04pt01.pl, csce322hw04pt02.pl, csce322hw04pt03.pl, and, maybe csce322hw04pt04.pl. If you modify helpers.pl, upload that as well. Otherwise, the default helpers.pl will be provided.

  1. 5  Point Allocation
  2. 6  External Resources

Prolog – Wikibooks
Learn Prolog Now!
Prolog Tutorial Category:Prolog – Rosetta Code

Component

Points

csce322hw04pt01.plcsce322hw04pt02.plcsce322hw04pt03.pl

30 30 40

Total

100

Page 3

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] Prolog Assignment 04
30 $