Question: 1 Introduction: ChessBoard, Problem & Solution This project aims to place chess pieces of five teams on a chess board of different sizes. The problem
Introduction: ChessBoard, Problem & Solution
This project aims to place chess pieces of five teams on a chess board of different sizes. The problem can be counted as a multiobjective approach on the NQueens problem. In the NQueens problem, the objective is to place N queens on an NxN chessboard so that none of the queens can attack each other. In NQueens problem, all the pieces can be though as belonging to different teams. Our changes over the problem are; allowing the pieces to belong to same team and including also the other type of chess pieces. The only change for the other pieces is about pawns attacking areas. In our problem, pawn
is assumed to treat all pieces at its four corners.
In the problem there are two objectives. First, the count of total attacking positions should be minimized. Second, the value of the team with the minimum value should be maximized. For the second objective, the values of different pieces which are also used for traditional algorithms in chess programming are employed. The values of different pieces can be seen in Table
Part Module Design
Create a module to define a chessboard with a given size. To do this you may create the
following enumerated types:
Piece: Bishop, Knight, Rook, Queen, Pawn
Team: Red, Green, Blue, Purple, White
Chessboard: A D list of tuples Piece Team
Part Score and Change Functions
After defining the types, the following functions should be defined.
attackcount: Total number of attacks of the given chessboard.
boardvalue: Total value of the board.
horizontalcrossover: For a horizontal line, change upper and lower parts of the board.
verticalcrossover: For a vertical line, change left and right parts of the board.
deletepiece: Delete a piece from the board.
Part Chessboard Tree
Create a tree containing a chessboard given in Figure as the head node. For every node, branches could be created using horizontalcrossover and verticalcrossover functions and branches could be created using deletepiece function. For different levels of tree, find the best chessboard for the both tasks.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
