Final Year Project Definition Document
AI approach to solving and creating Soduku Puzzles
Project Supervisor: Dr. Finlay Smith
Submitted By:
Brian O’Connell 02527324
Barry Wrafter 02075466
28-Oct-05
Table of Contents
1
1.1.
1.2.
2
2.1.
2.1.1.
2.1.2.
2.1.3.
2.1.4.
2.2.
2.3.
2.3.1.
2.3.2.
2.4.
2.4.1.
3
3.1
4
4.1
4.2
5
5.1
5.2
5.3
5.4
Background ............................................................................................................. 3
Problems to overcome............................................................................................. 3
Beneficiaries ........................................................................................................... 3
Objectives to be Achieved ...................................................................................... 3
Tackling Deliverables ............................................................................................. 4
Summarising Web Page .......................................................................................... 4
Final Report Project ................................................................................................ 4
Project Demonstration ............................................................................................ 4
Viva Voce ............................................................................................................... 5
Project Scope .......................................................................................................... 5
Users, Stakeholders ................................................................................................. 5
Stakeholders Needs ................................................................................................. 6
Stakeholders Expectations ...................................................................................... 6
Project Goal ............................................................................................................ 7
Milestones ............................................................................................................... 7
Technology Available ............................................................................................. 7
Software Available.................................................................................................. 7
Initial Design Proposal ............................................................................................ 9
Use Case Diagram................................................................................................... 9
Use Case Diagram Content ..................................................................................... 9
Project Management ............................................................................................. 11
Work breakdown Structure (WBS) ....................................................................... 11
Roles and Responsibilities .................................................................................... 11
Risk Management ................................................................................................. 12
Gantt Chart ............................................................................................................ 13
1 Background
1.1.
Problems to overcome
To solve a soduku puzzle, many constraints must be considered. The basic
constraints in a soduku puzzle claim that if the number is already in the row,
column or block, then it can not be entered in that square, but this does not tell
you where a number can be entered. This will be one of the main problems which
we must overcome early on in the project as without knowing our constraints, we
can’t create or solve the puzzles.
Another problem that we foresee occurring, is the fact neither of have much
experience with Visual Basic. We will both need to learn how to effectively use
this program in order to create a top of the range project.
We must also ensure that our programme creates different puzzles every time, and
doesn’t just create the same problem on a regular occasion.
During the creation of the puzzles, we must ensure that each puzzle has enough
symbols for the puzzle to be solved logically and that no guess work is involved.
1.2.
Beneficiaries
This program will benefit people who enjoy puzzles which can be solved
logically. Everyone involved in this project will also benefit, Dr. Finlay Smith,
Brian O’Connell, and Barry Wrafter.
Indirectly, AI as a whole may benefit from this project. If we discover a new way
of quickly creating and solving these puzzles, it may improve all things AI. This
may occur if we manage to create a program which creates random soduku
puzzles with AI which is better than the current AI programs currently available.
2 Objectives to be Achieved
Successful completion of the project means, creating a program which will create,
and solve soduku puzzles. The project should always create new, random puzzles;
these soduku puzzles must always be logically solvable. They should never
require guess work for the puzzle to be solved.
For this project to work we need to get Excel and Visual Basic working together.
We must learn how to use both of these programs efficiently for the project to
reach its potential.
The project will be finished and given an Oral Demonstration during the week
starting April 3rd 2006. Between then and now we have many different deadlines
for the project which must be met. Firstly, the Project Definition Document must
be handed up on Friday, 28th October, 2005. Following that we must have a web
page summarizing the project completed by Friday, 11th November, 2005. The
Final Project Report must be completed by Friday, 24th March, 2006. The
following week, beginning on Monday, 27th March, 2006, the project
demonstrations must take place, and then the oral demonstration will be made the
following week, completing our work on our Final Year Project.
2.1.
Tackling Deliverables
2.1.1. Summarising Web Page
This web page will be designed to explain exactly what our project
entails, and how it will be completed. The web page will be
designed using HTML. This page will contain a link to the IT
website which will hold a description of the final year project. The
web page we are designing will need to be maintained throughout
the course of the project, this will be undertaken by Barry Wrafter.
2.1.2. Final Report Project
This report will take the shape of a small thesis. It will have a large
emphasis on clarity and professionalism. It will contain numerous
chapters. These chapters will deal with the introduction, with a
technical review of the project – what techniques we discovered
from previous projects in this field, and how they affected our
work. The technical issues resolved throughout the project and
what work each of us undertook during the project. The results of
the project – did our program create random, solvable puzzles?
And a final review – where we can go in the future with this work.
2.1.3. Project Demonstration
The project demonstration will be given during the week beginning
March 27th, 2006. This will be presented before staff members. For
the demonstration to be successful, we must have our project
complete, and have a complete knowledge how it works, so as to
be able to explain to the examiners the manner in how the program
creates and solves the puzzles.
2.1.4. Viva Voce
This is the final part of the project and it will take place during the
week beginning April 3rd, 2006. This is an oral examination of our
project which will cover the project requirements, research
undertaken, technologies used, design implementations and a final
conclusion. As both of us will be interviewed separately for this,
we need to record accurately, what each member of the team
worked upon. We must ensure that the workload has been shared
correctly, but that each member also has knowledge of how each
step of the project was undertaken and completed.
2.2.
Project Scope
The project will initially have a program which creates the layout of a
soduku puzzle. The program will also fill in numbers into the table, which
will allow for the puzzle to be solved. This program will then allow users
to enter the numbers which they believe correct into individual squares,
but not the squares which are already occupied by numbers generated by
the program.
The program will offer a “help” button which will show the user where a
certain number can be entered logically, based on the numbers currently in
the table.
The program will also be able to show every step required to solve a
puzzle.
The user will be able to save the puzzle at any stage. This will be saved to
a text file. A “clear/undo” button will also be available in case of the user
making an error, and wanting to start over. The program will have three
different difficulty levels for the user, “easy”, “medium” and “hard”.
The user will also be given the option of printing off the puzzle which they
are working on, and if they do so, only the computer generated numbers
will be entered in the printed version of the puzzle.
The program will not just be limited to generating Soduku puzzles, but it
will also be able to generate and solve puzzles created by the team.
2.3.
Users, Stakeholders
The key stakeholders for this project are our supervisor, Dr. Finlay Smith,
of NUI, Galway, and the two project team members, Brian O’Connell and
Barry Wrafter.
Other stakeholders include people who enjoy solving logical problems,
and more specifically, people who enjoy Soduku puzzles, as they will be
able to attempt new and challenging soduku puzzles, either on their
computers or on paper. Smaller stakeholders, will be newspapers,
magazines, and other, media types who include these types of puzzles in
their publications.
2.3.1. Stakeholders Needs
The stakeholders all have individual needs and requirements. One
of the key stakeholders is our supervisor, Dr. Finlay Smith and he
requires us to have an in-depth understanding of the background of
soduku puzzles; to have an excellently designed puzzle with a
quality implementation; to have undertaken independent thought
and innovation; and to be able to explain and defend the
approaches which we took throughout the project.
The needs of both team members are very similar to those of our
project supervisor, as if we achieve those goals, we would receive
a top class honour for our project.
The other stakeholders, the people who enjoy these puzzles, will
require challenging, yet logically solvable puzzles, which don’t
take a long time to generate, or solve if that’s what the user
requires. The user should be able to see how the computer solves
the puzzles, and not have the puzzles suddenly populated. Each
number should be entered one at a time to help the user
understand.
The people who offer these puzzles in their publications will
require new, more challenging puzzles to offer their readers, and
will need these to be produced for different difficulty levels, as to
offer their readers a choice as to what level of puzzles they
attempt.
2.3.2. Stakeholders Expectations
The different stakeholders will have many different expectations.
Dr. Finlay Smith will expect a running program, capable of
producing randomly generated soduku puzzles, with different
difficulty ratings, ranging from easy to hard. Dr. Smith will also
expect that the project will be completed on time, meeting the
requirements outlined in this Project Definition Document. Finally
Dr. Smith, will expect us to create a new form of logically solvable
puzzles, based on the constraints of Soduku.
The program creators, Brian O’Connell and Barry Wrafter will
have similar expectations to Dr. Smith, as we will expect to have
the program up and running on time, with no major problems along
the way. We expect this program to create, and solve soduku
puzzles.
Publications which publish soduku puzzles will expect puzzles to
be generated randomly and offer different levels of difficulty. They
will also expect the puzzles to be logically solvable, and require no
guess work.
2.4.
Project Goal
The goal of this project is to produce a working program which creates,
and solves soduku puzzles. Before the main goal can be reached, the
deliverables discussed earlier must be met.
Also, depending on resources, the project may also look into the creation
of the new puzzles, similar to soduku, but also uniquely different.
2.4.1. Milestones
Our initial constraint will be the discovery of all the constraints
required to logically solve a Soduku puzzle
Following this, we must code the constraints in the programming
language we decide to use required to ensure that the program can
create solvable soduku puzzles, and that the program can also
solve the puzzles correctly.
Next we must design the layout of the puzzle. We must ensure that
the layout looks familiar to the puzzles currently available, as a
new looking design could scare off users. This is will be designed
in Java, or Visual Basic.
Next we must code the program using which ever language we
agree works best, ensuring it does exactly what we are looking for.
It must populate enough of the squares to allow for the puzzle to be
solved. It must keep within the constraints, and it shouldn’t make
the puzzle too easy. It should also show the user how a randomly
generated puzzle can be solved, indicating every step it is taking
along the way.
Finally, we will look into the idea of creating new puzzles, similar
to soduku puzzles in the fact they can be solved logically, and use
similar constraints, but these puzzles will be something new, while
fun and challenging.
3 Technology Available
3.1
Software Available
Before we can start the code for the program, we must choose a
programming language in which to develop the software.
For now we have rounded down our choices to three. They are C++, Java
and Visual Basic (VB). We provisionally decided to use Visual Basic in
the beginning of this Project Definition Document. We both have
experience with C (C++ is an extension) and Java, and a little with VB.
The three languages are all object orientated.
Java is fresh on our minds as we spent last year learning it. It’s free to use
and there are many different compilers to choose from. Java is easier to
use than C++, and above all: it is portable, WEB-oriented, and provides an
ever growing wealth of class libraries for ever new application domains.
We can choose to make an application or an applet, doing the latter will
allow us to put it on the project website.
We have two years of experience with C. It is easy to convert C programs
to C++. C++ inherits the speed of C. Even with the speed of modern
computers there are problems for which efficiency of language is of
paramount importance. There’s the capability of easy re-use and
modification of existing code to fit new problems is an important feature
of the C++ language. Debugging C and C++ programs can be very
frustrating. Errors in a C++ program may be very difficult to find because
the compiler may not catch them until many lines later.
Visual Basic programming language is very simple, particularly as to the
executable code. VB is a component integration language which is attuned
to Microsoft's Component Object Model ("COM"). COM components can
be written in different languages and then integrated using VB. VB is a
much slower than other programming languages, speed is needed for our
software to compute puzzles quickly and efficiently. Also our team has
very little experience with this language.
4 Initial Design Proposal
4.1
Use Case Diagram
4.2
Use Case Diagram Content
END USER>>
Choose Type Of Puzzle – The user will initially choose a type of Sudoku
puzzle for example standard (9*9 with numbers) or standard with letters or
15*15 etc.
Enter Incomplete Puzzle – User can enter incomplete Sudoku puzzle into a
graphical grid.
Request Solution – After an incomplete puzzle has been entered by user,
user can press the “Solve” button. The system will produce a solution (if
possible). User will be able to view each step of the solution if he/she
wants.
Request Hint – When the user clicks the “Hint” button, the system will
shade out a column, row or 9*9 square where a it is possible to fill out a
cell. If the user clicks “Hint” again then the exact cell where it is possible
to logical decide the number, is shaded.
Request Soduku Puzzle – User will be able to ask the system for a sudoku
puzzle (of a chosen difficulty).
Print Soduku – User will be allowed to print the requested puzzle on
paper.
SYSTEM>>
Solution for Incomplete puzzle - System will create a solution for an
entered puzzle. It will either give a complete solution or it will solve it
step by step.
Generate Sudoku Puzzle – System can generate a puzzle with variance
difficulties.
Help Documents – System provides documents to the user on how to use
the software.
5 Project Management
5.1
Work breakdown Structure (WBS)
Soduku
Solver
Project
Management
Requirement
s
Management
HTML
Design and
Layout
Functionality
5.2
Website
Design
Graphical
Interface
Content
Creation
Soduku
Logic
Algorithms
Programming
Solver
Rules And
Constraints
Software
Development
Testing And
Production
Graphics
And Interface
Programme
Generator
Assess
Difficulty
Roles and Responsibilities
For this team project to be a success, we must divide the workload of the
project between both team members, Brian O’Connell and Barry Wrafter.
This is due to the large workload, the time restraints and also because of
an individual’s knowledge in certain sectors. Due to both team members
enjoying Soduku puzzles, both members will work on the constraints, and
when we finish, we can compare the constraints to ensure we have every
option covered. Once the constraints have been verified, the team can start
work on coding them and on the layout design. Each member will take one
of those requirements. As we are unsure of which language we will be
using for the coding yet, we cannot say for certain, which team member
will be designing the layout for the puzzle, and which member will be
coding the constraints. Unfortunately, the coding of the constraints will
take considerably more time to complete, than the design of the puzzle
layout, so when the design is complete, whichever team member was
working upon that, will start working on our next project deliverable, the
webpage summarising the project.
Rules And
Constraints
The Final Project Report, which is to be completed by the end of March
2006, will require both team members input, to ensure we give our best
possible report.
As we wish create a new form of logically solvable puzzles, using similar
constraints to those used in Soduku. Both members of the project team
will also be required to work on the research into discovering a new
version of the puzzles.
5.3
Risk Management
Risk
Risk description
Probability
Effect
Timeconstraint
The major obstacle since
there will be numerous
problems to overcome
High
Disaster
Lack of skills
Not having sufficient
knowledge of something
or need to learn
something completely
knew
Medium
Disaster
Additional
time spent on
functionality
Wasting time on
unimportant features of
the software
Medium
Serious
Requirements
change
Requirements change
cannot be anticipated
Low
Serious
Technology
change
Wrong Development
Platform Chosen
Medium
Critical
Mitigation
(Assessment)
Time to develop
the system must
not be
underestimated.
Relevant
documents should
be produced on
time
Being more
determined and
hard working
Ensure that
important
objectives are
achieved then
additional
functionality are
implemented
The change cannot
be neglected and
accurate and timely
reaction is required
Striving to be
proficient in all
programming
languages and
seeking help from
experts on time
5.4
Gantt Chart
© Copyright 2026 Paperzz