10 likes | 142 Views
a. b. Bibliography. 1. Murach's Visual Basic 2010 / Anne Boehm. 2. The Backtracking Method: Examples in Pascal and C++ / Tiberiu Socaciu, Bogdan Patrut, Eugenia Iancu. 3. P, NP, and NP-Completeness: The Basics of Computational Complexity / Oded Goldreich.
E N D
a b Bibliography • 1. Murach's Visual Basic 2010 / Anne Boehm. • 2. The Backtracking Method: Examples in Pascal and C++ / Tiberiu Socaciu, • Bogdan Patrut, Eugenia Iancu. • 3. P, NP, and NP-Completeness: The Basics of Computational Complexity /Oded Goldreich. Computer Science, Academia and Industry Program The Griddlers Game Domain: Logic Puzzles Student:Liran Mesika Herzog High School, Kfar Saba Mentor: Dr. Dan Ophir, The Ariel University Center of SamariaTeacher: Ziva Kuntzman The Problem Challenges Given: an Empty Board (Fig. 1 a) with sequences of checkers in each row and column of the board To be found: a Picture corresponding the data Example: The corresponding solution: a squirrel image (Fig. 1 b). • The submitted project was my first experience in designing and creating a complex software system. • The challenges included the following aspects: • Learning a new programming language • Preparing the infrastructure • Learning the debugging process with breakpoints, watching • the variables values • Team work and supervision by an expert Figure 2: GUI Empty and filled windows for interactive treatment of the program. • Figure 1: Griddlers puzzle and its solution • The board and the data representing the • sequences of checkers for each column and row • The solution- the image of the squirrel (corresponding to the data in Fig. 1 a.) Methods and Solution Modules The program is triggered by a set of co-routines (calling each other recursively) based on the creating data-structure functions. The program uses the class CSequence which has two members: col and length. The Algorithm: isrobust and reduced backtracking per each row The interface matrices: 1. myPixel - The central buttons matrix for the blackened cells 2. myButtonUp - The upper buttons matrix for the upper data 3. myButtonLeft - The left buttons matrix for the left data Auxiliary matrices for the solution: 1. myStringUp - Matrix which is identical in form to myButtonUp and describes myPixel in particular configuration with temporary upper data 2. Solution - Describes the temporary game solution by containing the location of the beginning of a sequence and its length (as myButtonLeft). Methods: 1. Insert() - Insert the sequence on duty in the first empty place on the current row or on the next row 2. Move2Success() - Move the sequence on duty one place right 3. Delete() - Delete the sequence on duty. The Previous sequence is moved by Move2Success(). Insights • The project preparation process was for me an interesting, challengingandenrichingexperience. During the process I have learned and understood the importance of advance planning of the system and of the dividing it into parts that work together. I have also learned about the NP-Complete complexity and about the backtracking mechanism. • NP-Complete complexity