Вы находитесь на странице: 1из 3

CS-360 Artificial Intelligence Assignment 01: Programming Assignment

Total Marks: 100 Due date of announcement: April 25, 2012 Due date: May 02, 2012 till 11:59 PM Expected Minimum Average Time to Complete: 3-4 hours

OBJECTIVES:
To implement the covered course practically To find out the weak points and deficiencies in the course

PREREQUISITE SKILLS:
Programming Skills, Data Structures Related Knowledge of Artificial Intelligence

OVERVIEW:
Three programming problems are given to you. Program any one of the given three.

PROBLEM # 01: TIC-TAC-TOE GAME

[100 + 25 extra]

Problem Definition: Make a game TicTacToe which a user can play with computer. It should be a three by three matrix, the player and the computer take their turns one by one and mark some sign in a cell of matrix and the goal is to fill three cells in a row, column or in a diagonal with same sign to win. Input: Take input from the user to mark the cell he/she want. Logic: Prevent the user to make three consecutive signs as per goal and try to make computer win. Apply Heuristics and search trees to find your nearest and optimal Goal state. Output: In the end of game display the status of the game i.e. Player Wins, Computer Wins or Draw

PROBLEM # 02: TAKE THE MAXIMUM IN YOUR BAG

[100]

Problem Definition: You have a bag in which you can carry up to w=50 kg weight and you are provided with the following three things and their respective weight and value: No. 1 2 3 Name Diamond Gold Brick Silver Medal Wight (Wi kg) W1=3 W2=2.5 W3=1.5 Value (Vi Rs.) v1=1300 v2=900 v3=400

Now you have to fill your bag with these three things so that you can get maximum value in your bag. You are not allowed to make fraction of the given things i.e. you have to take the whole thing (complete weight) of your choice. Input: Take the inputs for bag capacity (W), Item name (Name), Weight (Wi) and Value (Vi) of different items from user. [The total weight W (capacity of the bag) and sub weights W1, W2, W3 (weight of different items) and the values V1, V2, V3 (values of different items)] Logic: You can use different search techniques to generate permutations for which you can get the maximum value. Output: You program should output the total maximum value you can make with these three things when carried in the bag. Also show that how many instances of things you take to get that value. Output of the above input should be as follows: Max. Value = 21200 Diamond = 16 Gold Brick = 0 Silver Medal = 1

PROBLEM # 03: A MAZE SEARCH

[100]

Problem Definition: You are given with an 8 x 8 grid in which there is an entry point and exit. But there are some walls in the way from entry point to exit. You can find out exit from may be more than one path. But you have to find the minimum (best) path. A sample grid is shown in the figure below:
Enter . . . . .

. .

. Exit

Logic: Implement the above using 2d array mark walls with some special signs. Then begin your search you can move up, down, right and left. On every move increment a counter by 1 and in case of back tracking decrement that counter. Output: In the end show the count that in how many minimum moves you can reach to exit.

FILES TO BE SUBMITTED:
You have to submit a hard copy of the code with the program output and also email your source codes on bcsf09@yahoo.com . Mention the subject by writing the section followed by your Roll No e.g. Morning BCSF09M018 Note: No discussion will be made about assignment between students. It will be considered as absolutely individual activity. TAs can take viva of assignment for surety purpose.

PROGRAMMING ASSIGNMENT GUIDELINE:


Students are allowed to develop their programming assignments in any programming language. Following are some of the general grading criteria that would be used to evaluate the quality of programming assignments. Program correctness Algorithm and data structure used Program robustness Programming style Program documentation/comments Appearance of the program's output Fulfillment of functional specifications Testing

On average minimum expected time to complete this assignment is from 3 to 4 hours. Students are advised to see their teaching assistants, if they find anything confusing in this assignment. Teaching assistants would be happy to help students with comprehending this assignment. No question regarding the solution of this assignment would be entertained. To this students are strictly advised to visit only in pre-charted visiting hours with a prior approved appointment via email correspondence.

Вам также может понравиться