StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

Program Analysis of Petri Chess - Coursework Example

Cite this document
Summary
The purpose of this paper "Program Analysis of Petri Chess" is to analyze the chess program to estimate its size, look at the functionalities, its relevance to the society, the actors, and stakeholders involved and such knowledge would help developers get some insights…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER94% of users find it useful

Extract of sample "Program Analysis of Petri Chess"

PROGRAM ANALYSIS OF PETRI CHESS NAME STUDENT ID INSTITUTION AFFILIATION DATE CHAPTERS Abstract 1 Introduction 1 1. Application Domains 2 2. Functionality and features 5 3. Size and Effort 7 3.1 Dynamic Analysis 9 4. Effort Analysis 14 5. UML Use Cases 16 6. UML Class Diagrams 17 7. Conclusion 23 8. References 24 Abstract Chess is one of the most loved game and many people who play chess are believed to be very rational people because the efforts it takes to strategize and move pieces along the board is not accidental; but is as a result of a well thought procedure that requires strategy, building an hypothesis on the moves and doing the experiment with your built strategy. Perhaps that is why in the movies, this game is used in scenes that want to portray thinking prowess. With the coming of computer and technology, people thought that such physicals games would come to an end, however, as others believed, that lovers of the game refused to let computer ruin this game and decided to take chess to the computer and hence developed a software that enables lovers of chess to still play it in the computer. And because of the madness of petri chess, there is a great need to know the efforts that was required to develop this software. As such, the purpose of this study is to analyze this program to estimate it size, look at the functionalities, its relevance to the society, the actors and stakeholders involved and it is my believe that such a knowledge would help developers get some insights and also lovers of petri chess would get a glimpse on the efforts behind this wonderful game. Introduction An effort put towards analyzing Petri chess might seem absurd particularly to people who do not understand the importance of system analysis. And one might believe that there are much more important application programs that need to be analyzed than this topic. Perhaps that is why finding literatures that comprehensively touch on this topic is very hard to find because program analysts have diverted their attentions to other programs. I have particularly been moved by how lovers of Petri chess scheme when playing and put their concentration as though they were about to discover something that has defeated the best thinkers of the world. That is where I got my inspiration. This is a game that has no age and in one location, I was amazed when I found out that the champion in that town was a six year old. How could a six year old engage her brain in such a tough game and beat older people? Well, that is not the reason for this work. This work is important in that it analyze Petri chess, bring a good knowledge to developers, programmers and also players of chess and those who would like to have a knowledge of playing chess because the work also discusses the moves and the dynamics involved. The work exposes you to the application domains of the system, benefits it has to the environment, gives information on system functionality, the staffing needed to develop the software, the cost involved and in the end gives additional diagrams for a deep understanding of the topic and in the conclusion, I have given insightful recommendations. 1 1. APPLICATION DOMAINS Petri’s Chess, a software based game, which mimics the game of chess that is played on a physical chess board, enables lovers of computers, who have affection for chess, not to be left out for this software game enable a real game of chess to be played on a computer system. On the computer, this game offers three modes of play. One mode is the Human vs. Human interaction, where two opponents can sit on a computer and play against each other. Next is the Human vs. computer where one plays again the computer and the computer simulates plays just like a real thinking person and lastly, the Computer vs. computer where the computer plays against itself and one sits and watch. This mode is useful to new learners who are interested in knowing the basics of chess game. When one plays chess on the computer, it gives the same excitement as it would have given players when playing on the real physical board. The other advantage of playing with the computer is that there are difficult levels where even professional chess player might not pass and this gives them some learning session to master advance moves. One of the best features of petri chess is that it has help menu that let learners to take time and learn the game of chess, something that was very hard to get on the physical boardroom chess and also many can quickly make references on advance steps. Expertise Required To Run The Game Petri’s chess is fairly a simple computer game that a beginner, an average or an experience computer user can easily learn and master within a short period of time. The game is fairly easy as it involves just mouse clicks to move the board items from one location to another, the game also offers visual direction to the users, when a user clicks on a item to move it, the game chess board glows with yellow color to show the user the number of steps that they can move and the direction, this can be really helpful to a beginner as they will clearly get oriented with the game and learn easily to master the steps and function of each chess element. Environment of deployment Petri’s chess can be deployed in a wide range of computing environments that have the latest version of Java runtime environment (JRE) installed on target environment of deployment, this being because the game is developed in java and requires the libraries and APIs provided by the java runtime environment in order for it to work well and function as expected. 2 Because of its nature of simplicity, the software makes it easy to operate on a varied number of environments, which includes laptop computer, desktop computer and application server. Moreover, the choice of language also offers an advantage as the software can be deployed via a compiled java package called “jar” file, the software can also be deployed via the web using a java deployment technique called “java webstart”. Benefits For Users/Companies It has been noted that chess is a game of all ages and it is the game where you will find teenagers playing as well as old people. It attracts people across all ages and most that associate with it are believed to be very rational in thinking. As such there are many benefits that come with playing chess and they include: (a) Advances and develops the scientific way of thinking. It is noted that chess needs one to approach the play from a rational perspective for it involves exploring new idea and as such many variations are brought into mind. Then there is the predicting of outcomes, interpreting revelations and the most important aspect of the game is where players develop hypothesis, then making moves based on the hypothesis. All these involve scientific thinking. (b) Memory becomes developed. Theory involve in chess is very much complicated because as a player, you have to memorize different variations. Also, to be smart in the game, one need to recognize many patterns and the ability to remember lengthy variations. As such all these combined improves concentration on players. Always, the focus of the player is always on the checkmate and how to become the victor at the end of the game. Thus the memory involved is very high. It has been noted that children who play chess have a very sharp memory and are very sharp. (c) Petri’s develops logical thinking. A critical requirement of the game is understanding of logical strategy. One of the critical logical strategies is about how to guard the kings at all time and avoiding making illogical mistake of weakening their positions. (d) Imagination and creativity is enhanced. The beautiful construction of moves and strategy and the thinking behind the play of chess involves a lot of creativity and thus, helps to improve imagination and creativity. Moreover, the developers of petri chess also have many benefits and opportunities and they include: (a) Revenue. The gaming technology is quickly revolutionizing how people interact and socialize, gaming is now turning out be a multi-million dollar lucrative opportunity to venture it. There are different ways that game users now are able to access games developed and posted online, they can download the games, play the games online, play the games via a local area network. Both of these methods can be for free or can be at a 3 fee. The developer who is interested in generating revenue may tap into this market by (b) setting a certain amount of fee and use the online gaming platform where users pay a fee and play online with other users who are also signed up. There are famous games that are currently using this opportunity to generate revenue; hence this also puts a challenge on the game developer to ensure that their game is good and efficient to keep up with the competitive nature of the market. (c) Startup Company. Many ideas have been known to transform into a startup and later a fully operation software company. Petri’s chess is not a exception to this. The developer can license this game as either open source or closed source licensing modes, after which they patent it and it becomes a branded product. Once they have the product ready they then apply the revenue generating mechanism to put it out in the online gaming market and start generating revenue. When they generate revenue they will have to start thinking about keeping their game improved and up to date and this will also open up opportunities to other people such as the graphic designers to keep up the game as much competitive as possible. (d) Partnerships. Most of the famous and established game companies in the world always seek to stay in the gaming business by having the best of the team to keep their games as competitive as possible as the developer of Petri’s chess this would be an opportunity to partner with these companies, and this would open up business opportunities, since most companies are interested in seeing a final working product before being interested in partnerships. Through these partnerships Petri’s chess can then be put out in the gaming market and bring in a lot of revenue to the partnering entities and hence help the developer get instant access to market opportunity which otherwise or normally would have taken a long time to tap. Alternatives to Petri’s Chess Chess variant, a game that is related to chess and believed to have heavily borrowed from chess, might confuse someone to be chess. However, there are some differences from the design of the board, which are always larger or smaller and have different intra-board cell shapes that might be in triangles or hexagon. Also, substitution of pieces is very different and also the rule of the game is very different. The other is the regional chess games such as xiangqi, shogi and chaturanga amongst others, are much older than western chess though they have some similarities with chess and they are believed to have originated from a common ancestor. 4 Stakeholders and actors The main stakeholders in Petri’s chess are the end user and interested companies. The users areresponsible for deploying the software from their machine for use and so are the companies. When these two stakeholders are interested they, first they purchase the software after which they are given a link of where to download and deploy their package from, this will be done via the “Java Webstart” which enables users to install Java applications from a website with little or no idea about the technicalities involved such as setting the Java Run Time Environment (JRE) which is required to run Java applications the target environment as this will be taken care of by Webstart. It is the responsibility of the developer to provide constant updates and maintenance to the end users of the Petri’s chess game so as any changes to design, software improvement, or logic is immediately benefited from by the end users. These will also popularize the game and improve customer trust and good feedback/reviews from its users. In cases where the game has to be retired it is the responsibility of the end user to retire the game. This process is fairly easy and familiar to a general computer user as it involves the common way of uninstalling a software component from a laptop or pc. 2. FUNCTIONALITIES AND FEATURES Chess is played on a checkered board and the most common checkered board is black and white color that gives it a contrasting tone of colors. In the game, the white moves first and afterwards, the players alternate in play according to the set rules. The most interest of the player is to corner the opponent’s principal piece, which is the king into check mate where it is prone to capture. Characteristics of the game The board of the game is made up of 64 squares arranged systematically in both eight horizontal and vertical rows called the ranks. These squares have an alternating pattern between two colors the brighter ones used always include white or yellow or binge and the darker ones always include black or green. The board is set between the two opponents so that each player has a light-colored square at the right-hand corner. 5 Main features of Petri’s Chess Features of Petri chess include the Player modes, Board pieces, Player moves, Player and Algebraic notation. Player modes In the introduction, we discussed on the three player mode and thus an understanding of this is already explained in the first paragraph a) Board pieces In the game, the super piece is the King and can move one square in any direction. Always, white kings begin the game on el. while black king move in the opposite direction at e8. Secondly, we have the Rook and always each player get two rooks which begin the game and the white begin at a8 and as the black to h1. When one has the rook, he/ she can move it vertically or horizontally to any free square along the rank it is put. Thirdly, the Bishop and the white begin the game at c1 and f1 while the black c8 and f8. The bishop can be moved to any free square on the diagonal to which it is placed. Fourth is the queen and each player gets one and it has the power of both the bishop and the rook combined giving in the power to be the most powerful and mobile piece on the checkerboard. Lastly is the Knight, which begins on the squares between the bishops and the rook where the white move at b1 and g1 as the black move to b8 and g8. In the game, the knight is known to have the trickiest move. b) Player moves The player move, which means the current player who is making the move on petri chess, is important for it determines and helps the player to make a move. It also determines the source of the piece and the destination of the move. A completion of the move becomes recorded in history of player moves thus the move becomes effected making a new change on the chess board. c) Player The player for petri chess is the human player on the computer and the computer. The human player makes a move using the mouse and the computer player (AI) play by calculating its move based on algorithm 6 Algebraic notation There are several forms of notation that can be used to record individual moves and the history of the entire game. The most common used is the algebraic notation and it recognizes each square with the light-coloured pieces known as the white and this is always from the point of view of the player. 1 through to 8 are the ranked numbers with the rank closest to white. All squares are named and each has its own individual letter and number. Then the files a all through to d are known as the queen side and on the other e through to h is the king side. 3. SIZE AND EFFORT Size Analysis Evaluation of size and staffing Metric Value ------------------------------- -------- Total Files - 11 Total Lines - 4,262 Avg Line Length - 26 Code Lines - 2,577 Comment Lines - 1,694 Whitespace Lines - 286 Code/(Comment+Whitespace) Ratio - 1.30 Code/Comment Ratio - 1.52 Code/Whitespace Ratio - 9.01 Code/Total Lines Ratio - 0.60 Code Lines Per File - 234 Comment Lines Per File - 154 Whitespace Lines Per File - 26 The following is a report generated from “Code Analyzer” after running it through the Petri’s Chess repository. The repository contains 11 source code files which accumulate to 4,262 lines of source code. From the repository there have been three code updates on the repository, the variation in dates is as listed below 7 Revision Commit Log Message Date R3 Added files 18/12/2010 R2 [No log message] 18/12/2010 R1 Initial directory structure 18/12/2010 From analyzing the repository we can tell that all the activities were committed on the same very day, from this we can conclude that either these software was already developed by the time of committing and hosting it in a code repository or: The software was developed and uploaded on the same very day it was committed to the code repository. From the above metrics of code analysis and repository analysis we can directly infer that the effort distribution was at its minimal or best level to make the process rapid. Either of the two we can conclude that the software development process was rapid and didn’t really take up much time from analysis of software code and the complexity of the code and algorithms. There is also a high possibility that the developers involved in this project was an individual, because of the number of activities committed on the file is a slightly low number as one would expect from the minimum development of a coordinated team effort. Also the commit message is not clear as to how the commits on the repository was done, a well documented commit should contain a clearly outlined message that briefly describes what each commit was about and how it affected the current status of the repository. The commits further look like they were just code uploads rather than code commits that is an approach commonly used by software developers working in a team or group. From the above metrics we can therefore conclude that the maximum time of development would be between 1 – 2 months, and the size of staff involved was 1. 8 3.1 DYNAMIC ANALYSIS Petri’s chess can be downloaded from the following URL: https://code.google.com/p/java-chess/ The following is an image of the given URL The page offers download options where you can choose to download the executable jar file, or download the source code and compile it and run it from your machine. This is shown below: 9 Using the system To start with, after a successful download of the system with either the option for source code or jar file, the second step is running the software. Next is to move to your downloads directory and extract the zip files and look into the folder that says “Java-chess” in-case you have downloaded the source code, but if you have downloaded the jar file just click to run the jar file. Once you are in the folder for “Java-chess” you will find also a jar file named “petris_chess.jar” click on it to run and the following output will be shown. 10 a. Features in source code Player Modes - In Source Code Sample Preview Of The Player Class 11 Board, Moves, Pieces 12 SmartSVN SmartSVN manages and structures the imported repos and track changes of code commits within the project. Image shows the files commit history as analyzed by SmartSVN. Image shows commit history, it is clear that commits were made by just one developer 4. EFFORT ANALYSIS Petri’s chess is a medium based technical software that a maximum number of two developers: a) Graphics designer The graphic designer will be responsible for working on the graphics features and components of the software. Graphics is one area that has be done in the best and perfect way possible because good graphics sell a lot and capture the user’s attention this will hence improve and promotion and advertising of the software. b) Programmer The software requires very little effort to implement and test and hence hiring one programmer will be enough to get the software from scratch to running with the help of the graphic designer much of the graphical user interface abstraction will be taken off the programmer’s shoulders and left alone to the graphic designer to do his/her magic, this hence enables the software programmer to focus only on the logic and working of the software. c) Project manager A project manager is the person in charge of managing the whole process of software development, setting milestones, hiring developers and technical team needed, setting up the budget of the whole project, ensuring the project is completed within the set time. Therefore to this project a project manager is a role that has to be filled to ensure there is proper execution of plan and that the project time is well observed and resources are well utilized to achieve results. This mechanism of abstraction will therefore enable each person to work and focus on their area of assignment and hence when it comes to measuring output the milestones will be clearly spelled out for each individual. d) Cost of development The cost of development is the amount of cash during software development cycle. The software development cycle involves several states: a) Problem identification and specification 14 b) Fact finding c) Specification document design and report d) Program design e) Program development f) Testing and debugging g) Implementation Through each step there is a cost involved, for example during problem identification the person doing this part will be forced to interact with different people from different places to find out what are some of the challenges that they face in relations to a manual system that is currently working. This may involve some cost such as travelling expenses; cost may also be involved when it comes to program design and development where we come to the process of hiring the technical team that now designs a solution based on the findings from the specification report. Cost may again be incurred when there is need to hire a project manager to oversee the development process. Below is a table that outlines some of the costs that will be incurred to develop the project: Resource Name Description Cost/Expenditure ($) Duration Software project manager In-charge of overseeing the whole project operations 333.33 X 3 = 1,000 3 months Graphics designer Designing, testing and implementation of software graphics 300 X 3 = 900 3 months Software developer (Programmer) Developing the software 320 X 3 = 960 3 months Total = 2,860 3 X 3 = 9 person - months 15 5. USE CASES Title – Start New Game Actor – Player Scenario – Player starts new game, Petri’s chess clears chess board and displays a new game Title – Make move Actor – Player, computer Scenario – Player/Computer makes a move, Petri’s chess validates move. Petri’s chess moves the piece to the target destination. Petri’s chess returns control to the next player. Extensions: Wrong move a) Petri’s chess displays error message indicating wrong move b) Petri’s chess cancels out move Title – Capture piece Actor – Player/computer Scenario – Petri’s chess identifies player move. Petri’s piece analyzes pieces. Petri’s chess captures enemy pieces within line of piece move. Title – Seek help Actor – Player Scenario – Player requests Petri’s chess help menu. Petri’s chess displays help menu to user Extension: Help does not exist a) User is given message indicating no help exists Title - Choose play mode Actor – Player Scenario – Player selects play mode. Petri’s chess gives back the correct play mode Title – Quit application Actor – Player Scenario – Player requests to end application. Petri’s chess ends 16 6. UML CLASS DIAGRAMS 17 System class diagrams 18 Player Package Full Class Outline 19 Board Class Diagram 20 Game Class Diagram History Of Moves Class Diagram 21 Move Class Diagram 22 Piece Class Diagram CONCLUSION When one plays petri chess in a computer, he/she does not have the knowledge and the efforts that are put to make the software to be developed and the codings needed to excecute the program. Most always believe that it took one person and the software was developed. Perhaps that is why many people always believe that when it comes to software games, then they sould get free downloads. A good reading of this report is enough to make consumers know the importance of acknowledging the people who develop the software and the amout of sacrifice and moaney they incur and learn that if they go for free downloads, then they do not help the people who work hard for them to enjoy the game. The finding of the report also brings into the light the complexity of the program and the efforts it takes to build it and this might act as an inspiration to people who would like to enter the bussiness of developing softwares. 23 References Avison, David, and Guy Fitzgerald. Information systems development: methodologies, techniques and tools. McGraw Hill, 2003. Davis, Fred D. "User acceptance of information technology: system characteristics, user perceptions and behavioral impacts." (1993). Kiesel, Andrea, et al. "Playing chess unconsciously." Journal of Experimental Psychology: Learning, Memory, and Cognition 35.1 (2009): 292. Shannon, Claude E. "XXII. Programming a computer for playing chess." Philosophical magazine 41.314 (1950): 256-275. Newell, Allen, John Calman Shaw, and Herbert Alexander Simon. "Chess-playing programs and the problem of complexity." IBM Journal of Research and Development 2.4 (1958): 320-335. 24 Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(Program Analysis of Petri Chess Coursework Example | Topics and Well Written Essays - 4250 words, n.d.)
Program Analysis of Petri Chess Coursework Example | Topics and Well Written Essays - 4250 words. https://studentshare.org/logic-programming/2051357-programme-analysis
(Program Analysis of Petri Chess Coursework Example | Topics and Well Written Essays - 4250 Words)
Program Analysis of Petri Chess Coursework Example | Topics and Well Written Essays - 4250 Words. https://studentshare.org/logic-programming/2051357-programme-analysis.
“Program Analysis of Petri Chess Coursework Example | Topics and Well Written Essays - 4250 Words”. https://studentshare.org/logic-programming/2051357-programme-analysis.
  • Cited: 0 times

CHECK THESE SAMPLES OF Program Analysis of Petri Chess

Factors to Be Considered when Defining Data

Additionally, research serves to increase the knowledge of researchers and the public in a… In order to obtain quality and reliable information in a research, the involved researchers must identify and make use of the appropriate methods for data collection and data analysis during the research process....
16 Pages (4000 words) Essay

Strengths and Weaknesses of Leadership Development

241), “up-front analysis is the key to making sure that the interventions target the right skills to positively impact organizational performance”.... For the effective leadership development, each company should implement the following factors: careful evaluation, suitable audience, proper infrastructure, efficacious learning system and relevant rewarding system (Leskiw & Singh 2007)....
2 Pages (500 words) Case Study

Principles of Entrepreneurship

hellip; The report provides a brief analysis about the situation prevalent within the UK market in relation to the demand for Smart TV's.... The report, Principles of Entrepreneurship, intends to describe how a firm which is operated by a leading Philanthropist along with entrepreneur can enter or penetrate into its existing market i....
10 Pages (2500 words) Coursework

Maternal and Newborn Care

It is concerned with the health of the prospective mother from the period before conception all through to the point of giving birth.... The period after giving birth is… Care for maternal health is done with the aim of reducing maternal morbidity and mortality.... Before conception, maternal health would involve educating the potential mother, health promotion, screening of women within the productive age to eliminate any problems During the pregnancy, proper care should be taken to ensure no complications are encountered and in case of any problems, they should be handled with urgency....
4 Pages (1000 words) Research Proposal

Johnson Bakers Business Strategies

The paper will discuss about the competitive analysis of the business and it will Marketing strategies and financial plans are also a part of this report.... Johnson Bakers is a private company that is owned by two individual partners.... Johnson Bakers attempts to provide its customers with various products like cakes,… The expectation of the company is that it will be able to pay off loan in next five years because of their increasing sales to be expected in next two years....
20 Pages (5000 words) Essay

Active Directory - a Contemporary Network Management Techniques

The project “Active Directory - a Contemporary Network Management Techniques” discusses a development and implementation of the tool which allows handling assign rights and security parameters.... Active Directory is a Windows characteristic presenting data management by network users....
5 Pages (1250 words) Research Paper

Enterprise System of Queensland Health

… References201.... Introduction Enterprise system is described as the bloodstream of a business.... In the current global business, the entire prosperity of the business greatly depend on the success of the use of Information Technology (IT), meaning that References201.... Introduction Enterprise system is described as the bloodstream of a business....
18 Pages (4500 words) Assignment

Electromagnetic Effects in the Vicinity of an Active Wind Farms

… Introduction Researches on Wind Farms and human health effects have continued to grow in the recent years.... Particular focuses have been put on issues such as shadow flicker, noise and electromagnetic effects of wind farms.... Studies such Nomura et al.... Introduction Researches on Wind Farms and human health effects have continued to grow in the recent years....
10 Pages (2500 words) Coursework
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us