├── .DS_Store ├── Chess ├── Media │ ├── Chess_Pieces_Sprite.png │ ├── board.png │ ├── flipDisabled.png │ ├── flipEnabled.png │ ├── green_box.png │ ├── green_circle_big.png │ ├── green_circle_neg.png │ ├── green_circle_small.png │ ├── playBlack.png │ ├── playWhite.png │ ├── red_circle_big.png │ ├── withAI.png │ ├── withfriend.png │ ├── yellow_box.png │ └── yellow_circle_big.png ├── Proposal-by-Khan.docx ├── README.md ├── chess.py ├── openingTable.txt └── readme.txt └── README.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/.DS_Store -------------------------------------------------------------------------------- /Chess/Media/Chess_Pieces_Sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Media/Chess_Pieces_Sprite.png -------------------------------------------------------------------------------- /Chess/Media/board.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Media/board.png -------------------------------------------------------------------------------- /Chess/Media/flipDisabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Media/flipDisabled.png -------------------------------------------------------------------------------- /Chess/Media/flipEnabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Media/flipEnabled.png -------------------------------------------------------------------------------- /Chess/Media/green_box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Media/green_box.png -------------------------------------------------------------------------------- /Chess/Media/green_circle_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Media/green_circle_big.png -------------------------------------------------------------------------------- /Chess/Media/green_circle_neg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Media/green_circle_neg.png -------------------------------------------------------------------------------- /Chess/Media/green_circle_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Media/green_circle_small.png -------------------------------------------------------------------------------- /Chess/Media/playBlack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Media/playBlack.png -------------------------------------------------------------------------------- /Chess/Media/playWhite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Media/playWhite.png -------------------------------------------------------------------------------- /Chess/Media/red_circle_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Media/red_circle_big.png -------------------------------------------------------------------------------- /Chess/Media/withAI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Media/withAI.png -------------------------------------------------------------------------------- /Chess/Media/withfriend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Media/withfriend.png -------------------------------------------------------------------------------- /Chess/Media/yellow_box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Media/yellow_box.png -------------------------------------------------------------------------------- /Chess/Media/yellow_circle_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Media/yellow_circle_big.png -------------------------------------------------------------------------------- /Chess/Proposal-by-Khan.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mnahinkhan/Chess/8834b592e70cd3e483c11ed0b307bb2750d11efa/Chess/Proposal-by-Khan.docx -------------------------------------------------------------------------------- /Chess/README.md: -------------------------------------------------------------------------------- 1 | # Chess 2 | -------------------------------------------------------------------------------- /Chess/chess.py: -------------------------------------------------------------------------------- 1 | # 15-112: Principles of Programming and Computer Science 2 | # Project: Chess Program 3 | # Name : Muhammad Nahin Khan 4 | # AndrewID : mnk1 5 | # File Created: 07/11/2016 6 | # Modification History: 7 | # Start End 8 | # 07/11 12:52 07/11 13:20 9 | # 07/11 18:00 07/11 21:06 10 | # 09/11 03:13 09/11 05:49 11 | # 09/11 15:38 09/11 16:19 12 | # 10/11 15:51 10/11 16:31 13 | # 10/11 20:17 10/11 21:34 14 | # 11/11 23:50 12/11 05:19 15 | # 13/11 00:01 13/11 01:34 16 | # 15/11 16:19 15/11 17:00 17 | # 16/11 01:00 16/11 01:49 18 | # 16/11 12:50 16/11 13:31 19 | # 17/11 21:20 17/11 22:21 20 | # 18/11 00:15 18/11 01:15 21 | # 18/11 19:01 19/11 20:20 22 | # 21/11 00:56 21/11 02:01 23 | # 21/11 19:36 21/11 20:30 24 | # 22/11 18:10 22/11 20:02 25 | # 23/11 01:00 23/11 02:30 26 | # 23/11 18:05 23/11 20:03 27 | # 25/11 04:10 25/11 04:50 28 | # 25/11 13:00 25/11 14:35 29 | # 25/11 18:35 25/11 19:25 30 | # 26/11 08:04 26/11 08:31 31 | # 26/11 21:44 26/11 23:31 32 | # 27/11 02:24 27/11 03:08 33 | # 34 | 35 | #Ensure that Pygame is installed 36 | 37 | #GUI inspired by: 38 | #https://en.lichess.org/ 39 | 40 | #Chess board image was taken from lichess website as well. 41 | #The images for the pieces came from: 42 | #https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Chess_Pieces_Sprite.svg/2000px-Chess_Pieces_Sprite.svg.png 43 | 44 | #AI ideas from: 45 | #https://chessprogramming.wikispaces.com/ 46 | 47 | # An online lecture that helped me understand alpha-beta pruning: 48 | # Winston, P. [MIT OpenCourseWare]. (2010) 6. Search: Games, Minimax, 49 | # and Alpha-Beta. [Video File]. Retrieved from https://www.youtube.com/watch?v=STjW3eH0Cik 50 | 51 | #Special thanks to professor Saquib for being so amazing. 52 | 53 | # This program is a chess game. The user may play against a friend or the 54 | # computer. 55 | # 56 | # The game state is mainly stored as a 2D list of strings, and most of the 57 | # processing is thus done on a list of strings. 58 | # 59 | # The GUI takes the current state and displays it on the screen. The GUI allows 60 | # drag and drop movement of pieces as well as click-click movement. 61 | # 62 | # The AI that plays against the human evaluates all possible moves made by either 63 | # player up to a certain level of depth. The AI evaluates each position by giving 64 | # it a score. The higher the value of the score, the more favourable a position 65 | # is for white and the lower the value of the score, the more favourable the 66 | # position is for black. Knowing that white will try to get the score to be higher 67 | # and black will try and get the score to be lower, the AI assumes best play from 68 | # either side as it traverses up the search tree and chooses the best move to be 69 | # played. A problem that may arise is the number of postions that need to be 70 | # evaulated. Even at 3 levels of depth, thousands of positions have to be 71 | # evaluatd. 72 | # Several methods are used in this program to reduce positions that are searched: 73 | # 1. Alpha-beta pruning: As a result of evaluating a position it can be found 74 | # that a portion of the search tree can be ignored as no further evaluations can 75 | # guarantee better results. This can happen because white and black area against 76 | # one another. White plays what is best for it and black plays what is best for it, 77 | # so it would make sense for white to ignore any portion of the tree where black 78 | # has a clear upperhand that it can choose to play. 79 | # 2. Transposition table: Often, two different pathways in a search tree can result 80 | # in the same board being evaluated. Instead of evaluating the same board several 81 | # times, the program stores a table of values in a dictionary where the keys are 82 | # the positions. This way, repeated positions can have their evaluations looked up 83 | # fairly quickly, as the board state is hashed. 84 | # 3. Opening Book - The opening book is again a dictionary that stores board 85 | # positions often seen in the beginning few moves in chess. Appropraite moves that 86 | # can be played at such positions is stored in the dictionary. A random move is 87 | # selected and played from the list of suggested moves wihtout searching if the AI 88 | # finds itself confronting a such a board postion. Note that this opening book was 89 | # recorded by myself and so it does not have many positions stored in it. 90 | # 91 | # In order to traverse the search tree as above, the AI needs to know how to evaluate the 92 | # board at any position to decide if white or black has the advantage. My evaluation 93 | # function currently looks at three main things when evaluating the board: 94 | # a) Material for white and black. Each piece has a value and the more pieces you have, 95 | # the better off your position is likely to be. For example, if white has an extra 96 | # queen, it has an advantage over black. 97 | # b) Piece-square table values - for each piece, there is a table that stores the best 98 | # squares that the particular piece should occupy. So if white has a knight at a 99 | # good square that controls the centre of the board, whereas black has a knight 100 | # at the corner of the board, the situation is evaluated as being more favourable 101 | # for white. 102 | # c) Reduction in points for doubled pawns, isolated pawns, and blocked pawns. If any 103 | # side has a set of pawns with the above features their points are slightly lower 104 | # to indicate a slight disadvantage in such a position. 105 | # d) A checkmate: a position where this has occured gets a very high point, so that the 106 | # AI moves towards this if it can. (or avoids it). 107 | # 108 | # There are also several ways in which this program may be improved: 109 | # 1. Move ordering: Given a certain position and the AI needs to search a few layers 110 | # deep from it, somehow pre-sorting each move by ranking them in their likelihood of 111 | # being good moves allows for earlier cut-offs to be made by alpha-beta pruning. 112 | # 2. Iterative Deepening: Instead of going directly to a given depth when searching, 113 | # the A.I. may evaluate the best move at depth 1, then depth 2, then depth 3, etc. 114 | # until it reaches the final depth it needed to calculate at depth n. The reason for 115 | # this is that it may be mathematically shown that this does not dignificantly increase 116 | # computation and allows the A.I. to make its best move if it needs to abide by a 117 | # time limit. 118 | # 3. Better data structure - I believe the structure I have used to keep the state of 119 | # the board (list of a list) may be slowing down accessing its elements or assigning 120 | # its elements. Improvement in efficiency of my code by changing data structures may 121 | # potentially improve the speed at which my AI makes its move. 122 | # 4. Import of large opening tables: There are databases available online that store 123 | # the best moves played by grandmasters at various key opening positions of the chess 124 | # game. Although my AI does make use of an opening table that I recorded for it myself, 125 | # it is not able to respond to many opening positions using the table since the table 126 | # only convers few positions. If an opening table with millions of positions could be 127 | # imported to this program, the AI's moves would improve in the beginning. It would also 128 | # give it more variety in terms of the move it plays. Furthermore, using good openings 129 | # allows the AI to make the best moves in the field it is best at: middle game tactics. 130 | # 5. Better evaluation of positions - The current features evaluated by the evaluation 131 | # function when judging a positoin to give it a score allows for good opening games and 132 | # tactics that often allow it to gain advantage over the opponents that I have tested it 133 | # against. However, there are many aspects of playing good chess that it does not 134 | # consider: like having good mobility of your pieces (eg a trapped bishop should be bad 135 | # for the AI but it doesn't know that). Other aspects include king safety, pawn structure, 136 | # etc. It could also use different evaluation for each game phase. For example, a pawn is 137 | # not worth much at the opening phase of the game but in the endgame it is very important 138 | # and so should be evaulated as a valuable piece. 139 | # 6. Endgame tables - As good as my AI may be in middle games, given a queen and a king to 140 | # attempt checkmate against a lone king, it would be unlikely for it to succeed. This is 141 | # because such checkmates, despite being simple, require a large number of combination of 142 | # moves to occur, the depth of which my AI would not be able to see. So endgame table allows 143 | # it to know (for a very large number of endgame positions) the best move to play in order 144 | # to attempt a win or a draw (or try its best to avoid a loss). 145 | 146 | 147 | #Note about coordinates: 148 | #Normally, algebraic notation is used to specify a box on a chess board. In this 149 | #program, coordinates will be index referecnes to the 2_D array that stores the 150 | #state of the board. Thus, e4 in algebraic notation would be expressed as (4,4) 151 | #in this program. 152 | 153 | #Import dependencies: 154 | import pygame #Game library 155 | from pygame.locals import * #For useful variables 156 | import copy #Library used to make exact copies of lists. 157 | import pickle #Library used to store dictionaries in a text file and read them from text files. 158 | import random #Used for making random selections 159 | from collections import defaultdict #Used for giving dictionary values default data types. 160 | from collections import Counter #For counting elements in a list effieciently. 161 | import threading #To allow for AI to think simultaneously while the GUI is coloring the board. 162 | import os #To allow path joining with cross-platform support 163 | 164 | 165 | ######################################################## 166 | #Class Definitions: 167 | ##################################################### 168 | #There are three classes used in this program: 169 | # 1. GamePosition - This class stores a chess position. A chess position constitutes several 170 | # features that specify the state of the game, such as the the player that has to play next, 171 | # castling rights of the players, number of irreversible moves played so far, the positions of 172 | # pieces on the board, etc. 173 | # 2. Shades - This is used for GUI. A shade is a transparent colored image that is displayed on 174 | # a specific square of the chess board, in order to show various things to the user such as 175 | # the squares to which a piece may move, the square that is currently selected, etc. The class 176 | # stores a reference to the image that the instance of the class should display when needed. It 177 | # also stores the coordinates at which the shade would be applied. 178 | # 3. Piece - This is also used for GUI. A Piece object stores the information about the image 179 | # that a piece should display (pawn, queen, etc.) and the coordinate at which it should be 180 | # displayed on thee chess board. 181 | ########################################################## 182 | class GamePosition: 183 | def __init__(self,board,player,castling_rights,EnP_Target,HMC,history = {}): 184 | self.board = board #A 2D array containing information about piece postitions. Check main 185 | #function to see an example of such a representation. 186 | self.player = player #Stores the side to move. If white to play, equals 0. If black to 187 | #play, stores 1. 188 | self.castling = castling_rights #A list that contains castling rights for white and 189 | #black. Each castling right is a list that contains right to castle kingside and queenside. 190 | self.EnP = EnP_Target #Stores the coordinates of a square that can be targeted by en passant capture. 191 | self.HMC = HMC #Half move clock. Stores the number of irreversible moves made so far, in order to help 192 | #detect draw by 50 moves without any capture or pawn movement. 193 | self.history = history #A dictionary that stores as key a position (hashed) and the value of each of 194 | #these keys represents the number of times each of these positions was repeated in order for this 195 | #position to be reached. 196 | 197 | def getboard(self): 198 | return self.board 199 | def setboard(self,board): 200 | self.board = board 201 | def getplayer(self): 202 | return self.player 203 | def setplayer(self,player): 204 | self.player = player 205 | def getCastleRights(self): 206 | return self.castling 207 | def setCastleRights(self,castling_rights): 208 | self.castling = castling_rights 209 | def getEnP(self): 210 | return self.EnP 211 | def setEnP(self, EnP_Target): 212 | self.EnP = EnP_Target 213 | def getHMC(self): 214 | return self.HMC 215 | def setHMC(self,HMC): 216 | self.HMC = HMC 217 | def checkRepition(self): 218 | #Returns True if any of of the values in the history dictionary is greater than 3. 219 | #This would mean a position had been repeated at least thrice in order to reach the 220 | #current position in this game. 221 | return any(value>=3 for value in self.history.itervalues()) 222 | def addtoHistory(self,position): 223 | #Generate a unique key out of the current position: 224 | key = pos2key(position) 225 | #Add it to the history dictionary. 226 | self.history[key] = self.history.get(key,0) + 1 227 | def gethistory(self): 228 | return self.history 229 | def clone(self): 230 | #This method returns another instance of the current object with exactly the same 231 | #parameters but independent of the current object. 232 | clone = GamePosition(copy.deepcopy(self.board), #Independent copy 233 | self.player, 234 | copy.deepcopy(self.castling), #Independent copy 235 | self.EnP, 236 | self.HMC) 237 | return clone 238 | class Shades: 239 | #Self explanatory: 240 | def __init__(self,image,coord): 241 | self.image = image 242 | self.pos = coord 243 | def getInfo(self): 244 | return [self.image,self.pos] 245 | class Piece: 246 | def __init__(self,pieceinfo,chess_coord): 247 | #pieceinfo is a string such as 'Qb'. The Q represents Queen and b 248 | #shows the fact that it is black: 249 | piece = pieceinfo[0] 250 | color = pieceinfo[1] 251 | #Get the information about where the image for this piece is stored 252 | #on the overall sprite image with all the pieces. Note that 253 | #square_width and square_height represent the size of a square on the 254 | #chess board. 255 | if piece=='K': 256 | index = 0 257 | elif piece=='Q': 258 | index = 1 259 | elif piece=='B': 260 | index = 2 261 | elif piece == 'N': 262 | index = 3 263 | elif piece == 'R': 264 | index = 4 265 | elif piece == 'P': 266 | index = 5 267 | left_x = square_width*index 268 | if color == 'w': 269 | left_y = 0 270 | else: 271 | left_y = square_height 272 | 273 | self.pieceinfo = pieceinfo 274 | #subsection defines the part of the sprite image that represents our 275 | #piece: 276 | self.subsection = (left_x,left_y,square_width,square_height) 277 | #There are two ways that the position of a piece is defined on the 278 | #board. The default one used is the chess_coord, which stores something 279 | #like (3,2). It represents the chess coordinate where our piece image should 280 | #be blitted. On the other hand, is pos does not hold the default value 281 | #of (-1,-1), it will hold pixel coordinates such as (420,360) that represents 282 | #the location in the window that the piece should be blitted on. This is 283 | #useful for example if our piece is transitioning from a square to another: 284 | self.chess_coord = chess_coord 285 | self.pos = (-1,-1) 286 | 287 | #The methods are self explanatory: 288 | def getInfo(self): 289 | return [self.chess_coord, self.subsection,self.pos] 290 | def setpos(self,pos): 291 | self.pos = pos 292 | def getpos(self): 293 | return self.pos 294 | def setcoord(self,coord): 295 | self.chess_coord = coord 296 | def __repr__(self): 297 | #useful for debugging 298 | return self.pieceinfo+'('+str(chess_coord[0])+','+str(chess_coord[1])+')' 299 | 300 | 301 | ######################################################## 302 | #Function Definitions: 303 | ##################################################### 304 | 305 | # The functions in this file may be classified into three main groups: 306 | # 1. Chess Processing Functions - these are the functions that work with variables 307 | # that hold the information about game state. 308 | # 2. GUI Functions - These are the functions that work together to display the 309 | # chess board to the user and get the user's input as well, so that they may be 310 | # passed on to the Chess Processing Functions. 311 | # 3. AI related functions - These are the functions involved in helping the 312 | # computer make decisions in terms of what should be played. 313 | 314 | #///////////////////////////////CHESS PROCESSING FUNCTIONS//////////////////// 315 | # 316 | # drawText(board) - This function is not called in this program. It is useful for debugging 317 | # purposes, as it allows a board to be printed to the screen in a readable format. 318 | # 319 | # isOccupied(board,x,y) - Returns true if a given coordinate on the board is not empty, and 320 | # false otherwise. 321 | # 322 | # isOccupiedby(board,x,y,color) - Same as above, but only returns true if the square 323 | # specified by the coordinates is of the specifc color inputted. 324 | # 325 | # filterbyColor(board,listofTuples,color) - This function takes the board state, a list 326 | # of coordinates, and a color as input. It will return the same list, but without 327 | # coordinates that are out of bounds of the board and also without those occupied by the 328 | # pieces of the particular color passed to this function as an argument. In other words, 329 | # if 'white' is passed in, it will not return any white occupied square. 330 | # 331 | # lookfor(board,piece) - This functions takes the 2D array that represents a board and finds 332 | # the indices of all the locations that is occupied by the specified piece. The list of 333 | # indices is returned. 334 | # 335 | # isAttackedby(position,target_x,target_y,color) - This function checks if the square specified 336 | # by (target_x,target_y) coordinates is being attacked by any of a specific colored set of pieces. 337 | # 338 | # findPossibleSquares(position,x,y,AttackSearch=False) - This function takes as its input the 339 | # current state of the chessboard, and a particular x and y coordinate. It will return for the 340 | # piece on that board a list of possible coordinates it could move to, including captures and 341 | # excluding illegal moves (eg moves that leave a king under check). AtttackSearch is an 342 | # argument used to ensure infinite recursions do not occur. 343 | # 344 | # makemove(position,x,y,x2,y2) - This function makes a move on the board. The position object 345 | # gets updated here with new information. (x,y) are coordinates of the piece to be moved, and 346 | # (x2,y2) are coordinates of the destination. (x2,y2) being correct destination (ie the move 347 | # a valid one) is not checked for and is assumed to be the case. 348 | # 349 | # opp(color) - Returns the complimentary color to the one passed. So inputting 'black' returns 350 | # 'w', for example. 351 | # 352 | # isCheck(position,color) - This function takes a position as its input and checks if the 353 | # King of the specified color is under attack by the enemy. Returns true if that is the case, 354 | # and false otherwise. 355 | # 356 | # isCheckmate(position,color=-1) - This function tells you if a position is a checkmate. 357 | # Color is an optional argument that may be passed to specifically check for mate against a 358 | # specific color. 359 | # 360 | # isStalemate(position) - This function checks if a particular position is a stalemate. 361 | # If it is, it returns true, otherwise it returns false. 362 | # 363 | # getallpieces(position,color) - This function returns a list of positions of all the pieces on 364 | # the board of a particular color. 365 | # 366 | # allMoves(position, color) - This function takes as its argument a position and a color/colorsign 367 | # that represents a side. It generates a list of all possible moves for that side and returns it. 368 | # 369 | # pos2key(position) - This function takes a position as input argument. For this particular 370 | # position, it will generate a unique key that can be used in a dictionary by making it hashable. 371 | # 372 | 373 | ##/////////////////////////////////////////////GUI FUNCTIONS//////////////////////////////// 374 | # chess_coord_to_pixels(chess_coord) - This function takes as input a chess coordinate such as 375 | # (4,7). It returns the top left corner pixel at which a piece of the given size should be 376 | # placed on the board for it to appear at the correct square. 377 | # 378 | # pixel_coord_to_chess(pixel_coord) - Does the exact opposite of above, namely taking the 379 | # pixel coordinate and giving back the chess coordinate of a particular square. 380 | # 381 | # getPiece(chess_coord) - Gives back the reference to the Piece object that occupies 382 | # a particular chess coordinate. 383 | # 384 | # createPieces(board) - Loops through all the pieces in the inputted board array 385 | # and creates an instance of Piece class for each of them. Returns a list of two 386 | # lists: one that contains all the references to the white pieces, and the other 387 | # for black. 388 | # 389 | # createShades(listofTuples) - This will modify the global list listofShades. It 390 | # will create instance of class Shade for all the specified coordinates given in 391 | # listofTuples (the input argument). These squares are ones that are attacked by 392 | # a particular piece. Furthermore, it will append other appropriate shades as well, 393 | # such as shades used to show checkmate or stalemate. 394 | # 395 | # drawBoard() - Blits to the screen the board, the pieces, and the shades needed 396 | # to make the game look nice. 397 | # 398 | 399 | ##//////////////////////////////////////AI RELATED FUNCTIONS//////////////////////////////// 400 | # 401 | # negamax(position,depth,alpha,beta,colorsign,bestMoveReturn,root=True) - This 402 | # function takes as its inputs a position, and a depth to which moves should be 403 | # analysed. It will generate moves and analyse resulting positions to decide the 404 | # best move to be played for the AI. Alpha and beta are lower and upper bounds to 405 | # a position's possible 406 | # score values and allows for alpha-beta pruning. Colorsign indicates the player 407 | # to move. bestMoveReturn is a list that will be assigned the move to be played. 408 | # Returning is not possible in this case because threading is used. root is a 409 | # variable that keeps track of whether the original node is processing now or a 410 | # lower node. Alpha beta pruning is not explained in detail here so I recommend 411 | # learning more about it if the code does not make sense. 412 | # Note that the function does not always traverse a tree to give back the move 413 | # to be played by the AI. It also checks the opening table to see if there is a 414 | # prerecorded move that it can play without searching. Scoring of each position 415 | # is also stored in a global dictionary to allow for time-saving if the same 416 | # position occurs elsewhere in the tree. The code used here is adapted from the 417 | # pseudocode provided at Wikipidea: 418 | # https://en.wikipedia.org/wiki/Negamax#Negamax_with_alpha_beta_pruning 419 | # 420 | # evaluate(position) - This function takes as input a position to be analysed. 421 | # It will look at the positioning of pieces on the board to judge whether white 422 | # has an advantage or black. If it returns zero, it means it considers the 423 | # position to be equal for both sides. A positive value is an advantage to the 424 | # white side and a negative value is an advantage to the black side. 425 | # 426 | # pieceSquareTable(flatboard,gamephase) - Gives a position a score based solely 427 | # on tables that define points for each position for each piece type. 428 | # 429 | # doubledPawns(board,color) - This function counts the number of doubled pawns 430 | # for a player and returns it. Doubled pawns are those that are on the same file. 431 | # 432 | # blockedPawns(board,color) - This function counts the number of blocked pawns 433 | # for a player and returns it. Blocked pawns are those that have a piece in front 434 | # of them and so cannot advance forward. 435 | # 436 | # isolatedPawns(board,color) - This function counts the number of isolated pawns 437 | # for a player. These are pawns that do not have supporting pawns on adjacent files 438 | # and so are difficult to protect. 439 | # 440 | # 441 | ##################################/////CHESS PROCESSING FUNCTIONS\\\\######################## 442 | def drawText(board): 443 | for i in range(len(board)): 444 | for k in range(len(board[i])): 445 | if board[i][k]==0: 446 | board[i][k] = 'Oo' 447 | print board[i] 448 | for i in range(len(board)): 449 | for k in range(len(board[i])): 450 | if board[i][k]=='Oo': 451 | board[i][k] = 0 452 | def isOccupied(board,x,y): 453 | if board[y][x] == 0: 454 | #The square has nothing on it. 455 | return False 456 | return True 457 | def isOccupiedby(board,x,y,color): 458 | if board[y][x]==0: 459 | #the square has nothing on it. 460 | return False 461 | if board[y][x][1] == color[0]: 462 | #The square has a piece of the color inputted. 463 | return True 464 | #The square has a piece of the opposite color. 465 | return False 466 | def filterbyColor(board,listofTuples,color): 467 | filtered_list = [] 468 | #Go through each coordinate: 469 | for pos in listofTuples: 470 | x = pos[0] 471 | y = pos[1] 472 | if x>=0 and x<=7 and y>=0 and y<=7 and not isOccupiedby(board,x,y,color): 473 | #coordinates are on-board and no same-color piece is on the square. 474 | filtered_list.append(pos) 475 | return filtered_list 476 | def lookfor(board,piece): 477 | listofLocations = [] 478 | for row in range(8): 479 | for col in range(8): 480 | if board[row][col] == piece: 481 | x = col 482 | y = row 483 | listofLocations.append((x,y)) 484 | return listofLocations 485 | def isAttackedby(position,target_x,target_y,color): 486 | #Get board 487 | board = position.getboard() 488 | #Get b from black or w from white 489 | color = color[0] 490 | #Get all the squares that are attacked by the particular side: 491 | listofAttackedSquares = [] 492 | for x in range(8): 493 | for y in range(8): 494 | if board[y][x]!=0 and board[y][x][1]==color: 495 | listofAttackedSquares.extend( 496 | findPossibleSquares(position,x,y,True)) #The true argument 497 | #prevents infinite recursion. 498 | #Check if the target square falls under the range of attack by the specified 499 | #side, and return it: 500 | return (target_x,target_y) in listofAttackedSquares 501 | def findPossibleSquares(position,x,y,AttackSearch=False): 502 | #Get individual component data from the position object: 503 | board = position.getboard() 504 | player = position.getplayer() 505 | castling_rights = position.getCastleRights() 506 | EnP_Target = position.getEnP() 507 | #In case something goes wrong: 508 | if len(board[y][x])!=2: #Unexpected, return empty list. 509 | return [] 510 | piece = board[y][x][0] #Pawn, rook, etc. 511 | color = board[y][x][1] #w or b. 512 | #Have the complimentary color stored for convenience: 513 | enemy_color = opp(color) 514 | listofTuples = [] #Holds list of attacked squares. 515 | 516 | if piece == 'P': #The piece is a pawn. 517 | if color=='w': #The piece is white 518 | if not isOccupied(board,x,y-1) and not AttackSearch: 519 | #The piece immediately above is not occupied, append it. 520 | listofTuples.append((x,y-1)) 521 | 522 | if y == 6 and not isOccupied(board,x,y-2): 523 | #If pawn is at its initial position, it can move two squares. 524 | listofTuples.append((x,y-2)) 525 | 526 | if x!=0 and isOccupiedby(board,x-1,y-1,'black'): 527 | #The piece diagonally up and left of this pawn is a black piece. 528 | #Also, this is not an 'a' file pawn (left edge pawn) 529 | listofTuples.append((x-1,y-1)) 530 | if x!=7 and isOccupiedby(board,x+1,y-1,'black'): 531 | #The piece diagonally up and right of this pawn is a black one. 532 | #Also, this is not an 'h' file pawn. 533 | listofTuples.append((x+1,y-1)) 534 | if EnP_Target!=-1: #There is a possible en pasant target: 535 | if EnP_Target == (x-1,y-1) or EnP_Target == (x+1,y-1): 536 | #We're at the correct location to potentially perform en 537 | #passant: 538 | listofTuples.append(EnP_Target) 539 | 540 | elif color=='b': #The piece is black, same as above but opposite side. 541 | if not isOccupied(board,x,y+1) and not AttackSearch: 542 | listofTuples.append((x,y+1)) 543 | if y == 1 and not isOccupied(board,x,y+2): 544 | listofTuples.append((x,y+2)) 545 | if x!=0 and isOccupiedby(board,x-1,y+1,'white'): 546 | listofTuples.append((x-1,y+1)) 547 | if x!=7 and isOccupiedby(board,x+1,y+1,'white'): 548 | listofTuples.append((x+1,y+1)) 549 | if EnP_Target == (x-1,y+1) or EnP_Target == (x+1,y+1): 550 | listofTuples.append(EnP_Target) 551 | 552 | elif piece == 'R': #The piece is a rook. 553 | #Get all the horizontal squares: 554 | for i in [-1,1]: 555 | #i is -1 then +1. This allows for searching right and left. 556 | kx = x #This variable stores the x coordinate being looked at. 557 | while True: #loop till break. 558 | kx = kx + i #Searching left or right 559 | if kx<=7 and kx>=0: #Making sure we're still in board. 560 | 561 | if not isOccupied(board,kx,y): 562 | #The square being looked at it empty. Our rook can move 563 | #here. 564 | listofTuples.append((kx,y)) 565 | else: 566 | #The sqaure being looked at is occupied. If an enemy 567 | #piece is occupying it, it can be captured so its a valid 568 | #move. 569 | if isOccupiedby(board,kx,y,enemy_color): 570 | listofTuples.append((kx,y)) 571 | #Regardless of the occupying piece color, the rook cannot 572 | #jump over. No point continuing search beyond in this 573 | #direction: 574 | break 575 | 576 | else: #We have exceeded the limits of the board 577 | break 578 | #Now using the same method, get the vertical squares: 579 | for i in [-1,1]: 580 | ky = y 581 | while True: 582 | ky = ky + i 583 | if ky<=7 and ky>=0: 584 | if not isOccupied(board,x,ky): 585 | listofTuples.append((x,ky)) 586 | else: 587 | if isOccupiedby(board,x,ky,enemy_color): 588 | listofTuples.append((x,ky)) 589 | break 590 | else: 591 | break 592 | 593 | elif piece == 'N': #The piece is a knight. 594 | #The knight can jump across a board. It can jump either two or one 595 | #squares in the x or y direction, but must jump the complimentary amount 596 | #in the other. In other words, if it jumps 2 sqaures in the x direction, 597 | #it must jump one square in the y direction and vice versa. 598 | for dx in [-2,-1,1,2]: 599 | if abs(dx)==1: 600 | sy = 2 601 | else: 602 | sy = 1 603 | for dy in [-sy,+sy]: 604 | listofTuples.append((x+dx,y+dy)) 605 | #Filter the list of tuples so that only valid squares exist. 606 | listofTuples = filterbyColor(board,listofTuples,color) 607 | elif piece == 'B': # A bishop. 608 | #A bishop moves diagonally. This means a change in x is accompanied by a 609 | #change in y-coordiante when the piece moves. The changes are exactly the 610 | #same in magnitude and direction. 611 | for dx in [-1,1]: #Allow two directions in x. 612 | for dy in [-1,1]: #Similarly, up and down for y. 613 | kx = x #These varibales store the coordinates of the square being 614 | #observed. 615 | ky = y 616 | while True: #loop till broken. 617 | kx = kx + dx #change x 618 | ky = ky + dy #change y 619 | if kx<=7 and kx>=0 and ky<=7 and ky>=0: 620 | #square is on the board 621 | if not isOccupied(board,kx,ky): 622 | #The square is empty, so our bishop can go there. 623 | listofTuples.append((kx,ky)) 624 | else: 625 | #The square is not empty. If it has a piece of the 626 | #enemy,our bishop can capture it: 627 | if isOccupiedby(board,kx,ky,enemy_color): 628 | listofTuples.append((kx,ky)) 629 | #Bishops cannot jump over other pieces so terminate 630 | #the search here: 631 | break 632 | else: 633 | #Square is not on board. Stop looking for more in this 634 | #direction: 635 | break 636 | 637 | elif piece == 'Q': #A queen 638 | #A queen's possible targets are the union of all targets that a rook and 639 | #a bishop could have made from the same location 640 | #Temporarily pretend there is a rook on the spot: 641 | board[y][x] = 'R' + color 642 | list_rook = findPossibleSquares(position,x,y,True) 643 | #Temporarily pretend there is a bishop: 644 | board[y][x] = 'B' + color 645 | list_bishop = findPossibleSquares(position,x,y,True) 646 | #Merge the lists: 647 | listofTuples = list_rook + list_bishop 648 | #Change the piece back to a queen: 649 | board[y][x] = 'Q' + color 650 | elif piece == 'K': # A king! 651 | #A king can make one step in any direction: 652 | for dx in [-1,0,1]: 653 | for dy in [-1,0,1]: 654 | listofTuples.append((x+dx,y+dy)) 655 | #Make sure the targets aren't our own piece or off-board: 656 | listofTuples = filterbyColor(board,listofTuples,color) 657 | if not AttackSearch: 658 | #Kings can potentially castle: 659 | right = castling_rights[player] 660 | #Kingside 661 | if (right[0] and #has right to castle 662 | board[y][7]!=0 and #The rook square is not empty 663 | board[y][7][0]=='R' and #There is a rook at the appropriate place 664 | not isOccupied(board,x+1,y) and #The square on its right is empty 665 | not isOccupied(board,x+2,y) and #The second square beyond is also empty 666 | not isAttackedby(position,x,y,enemy_color) and #The king isn't under atack 667 | not isAttackedby(position,x+1,y,enemy_color) and #Or the path through which 668 | not isAttackedby(position,x+2,y,enemy_color)):#it will move 669 | listofTuples.append((x+2,y)) 670 | #Queenside 671 | if (right[1] and #has right to castle 672 | board[y][0]!=0 and #The rook square is not empty 673 | board[y][0][0]=='R' and #The rook square is not empty 674 | not isOccupied(board,x-1,y)and #The square on its left is empty 675 | not isOccupied(board,x-2,y)and #The second square beyond is also empty 676 | not isOccupied(board,x-3,y) and #And the one beyond. 677 | not isAttackedby(position,x,y,enemy_color) and #The king isn't under atack 678 | not isAttackedby(position,x-1,y,enemy_color) and #Or the path through which 679 | not isAttackedby(position,x-2,y,enemy_color)):#it will move 680 | listofTuples.append((x-2,y)) #Let castling be an option. 681 | 682 | #Make sure the king is not under attack as a result of this move: 683 | if not AttackSearch: 684 | new_list = [] 685 | for tupleq in listofTuples: 686 | x2 = tupleq[0] 687 | y2 = tupleq[1] 688 | temp_pos = position.clone() 689 | makemove(temp_pos,x,y,x2,y2) 690 | if not isCheck(temp_pos,color): 691 | new_list.append(tupleq) 692 | listofTuples = new_list 693 | return listofTuples 694 | def makemove(position,x,y,x2,y2): 695 | #Get data from the position: 696 | board = position.getboard() 697 | piece = board[y][x][0] 698 | color = board[y][x][1] 699 | #Get the individual game components: 700 | player = position.getplayer() 701 | castling_rights = position.getCastleRights() 702 | EnP_Target = position.getEnP() 703 | half_move_clock = position.getHMC() 704 | #Update the half move clock: 705 | if isOccupied(board,x2,y2) or piece=='P': 706 | #Either a capture was made or a pawn has moved: 707 | half_move_clock = 0 708 | else: 709 | #An irreversible move was played: 710 | half_move_clock += 1 711 | 712 | #Make the move: 713 | board[y2][x2] = board[y][x] 714 | board[y][x] = 0 715 | 716 | #Special piece requirements: 717 | #King: 718 | if piece == 'K': 719 | #Ensure that since a King is moved, the castling 720 | #rights are lost: 721 | castling_rights[player] = [False,False] 722 | #If castling occured, place the rook at the appropriate location: 723 | if abs(x2-x) == 2: 724 | if color=='w': 725 | l = 7 726 | else: 727 | l = 0 728 | 729 | if x2>x: 730 | board[l][5] = 'R'+color 731 | board[l][7] = 0 732 | else: 733 | board[l][3] = 'R'+color 734 | board[l][0] = 0 735 | #Rook: 736 | if piece=='R': 737 | #The rook moved. Castling right for this rook must be removed. 738 | if x==0 and y==0: 739 | #Black queenside 740 | castling_rights[1][1] = False 741 | elif x==7 and y==0: 742 | #Black kingside 743 | castling_rights[1][0] = False 744 | elif x==0 and y==7: 745 | #White queenside 746 | castling_rights[0][1] = False 747 | elif x==7 and y==7: 748 | #White kingside 749 | castling_rights[0][0] = False 750 | #Pawn: 751 | if piece == 'P': 752 | #If an en passant kill was made, the target enemy must die: 753 | if EnP_Target == (x2,y2): 754 | if color=='w': 755 | board[y2+1][x2] = 0 756 | else: 757 | board[y2-1][x2] = 0 758 | #If a pawn moved two steps, there is a potential en passant 759 | #target. Otherise, there isn't. Update the variable: 760 | if abs(y2-y)==2: 761 | EnP_Target = (x,(y+y2)/2) 762 | else: 763 | EnP_Target = -1 764 | #If a pawn moves towards the end of the board, it needs to 765 | #be promoted. Note that in this game a pawn is being promoted 766 | #to a queen regardless of user choice. 767 | if y2==0: 768 | board[y2][x2] = 'Qw' 769 | elif y2 == 7: 770 | board[y2][x2] = 'Qb' 771 | else: 772 | #If a pawn did not move, the en passsant target is gone as well, 773 | #since a turn has passed: 774 | EnP_Target = -1 775 | 776 | #Since a move has been made, the other player 777 | #should be the 'side to move' 778 | player = 1 - player 779 | #Update the position data: 780 | position.setplayer(player) 781 | position.setCastleRights(castling_rights) 782 | position.setEnP(EnP_Target) 783 | position.setHMC(half_move_clock) 784 | def opp(color): 785 | color = color[0] 786 | if color == 'w': 787 | oppcolor = 'b' 788 | else: 789 | oppcolor = 'w' 790 | return oppcolor 791 | def isCheck(position,color): 792 | #Get data: 793 | board = position.getboard() 794 | color = color[0] 795 | enemy = opp(color) 796 | piece = 'K' + color 797 | #Get the coordinates of the king: 798 | x,y = lookfor(board,piece)[0] 799 | #Check if the position of the king is attacked by 800 | #the enemy and return the result: 801 | return isAttackedby(position,x,y,enemy) 802 | def isCheckmate(position,color=-1): 803 | 804 | if color==-1: 805 | return isCheckmate(position,'white') or isCheckmate(position,'b') 806 | color = color[0] 807 | if isCheck(position,color) and allMoves(position,color)==[]: 808 | #The king is under attack, and there are no possible moves for this side to make: 809 | return True 810 | #Either the king is not under attack or there are possible moves to be played: 811 | return False 812 | def isStalemate(position): 813 | #Get player to move: 814 | player = position.getplayer() 815 | #Get color: 816 | if player==0: 817 | color = 'w' 818 | else: 819 | color = 'b' 820 | if not isCheck(position,color) and allMoves(position,color)==[]: 821 | #The player to move is not under check yet cannot make a move. 822 | #It is a stalemate. 823 | return True 824 | return False 825 | def getallpieces(position,color): 826 | #Get the board: 827 | board = position.getboard() 828 | listofpos = [] 829 | for j in range(8): 830 | for i in range(8): 831 | if isOccupiedby(board,i,j,color): 832 | listofpos.append((i,j)) 833 | return listofpos 834 | def allMoves(position, color): 835 | #Find if it is white to play or black: 836 | if color==1: 837 | color = 'white' 838 | elif color ==-1: 839 | color = 'black' 840 | color = color[0] 841 | #Get all pieces controlled by this side: 842 | listofpieces = getallpieces(position,color) 843 | moves = [] 844 | #Loop through each piece: 845 | for pos in listofpieces: 846 | #For each piece, find all the targets it can attack: 847 | targets = findPossibleSquares(position,pos[0],pos[1]) 848 | for target in targets: 849 | #Save them all as possible moves: 850 | moves.append([pos,target]) 851 | return moves 852 | def pos2key(position): 853 | #Get board: 854 | board = position.getboard() 855 | #Convert the board into a tuple so it is hashable: 856 | boardTuple = [] 857 | for row in board: 858 | boardTuple.append(tuple(row)) 859 | boardTuple = tuple(boardTuple) 860 | #Get castling rights: 861 | rights = position.getCastleRights() 862 | #Convert to a tuple: 863 | tuplerights = (tuple(rights[0]),tuple(rights[1])) 864 | #Generate the key, which is a tuple that also takes into account the side to play: 865 | key = (boardTuple,position.getplayer(), 866 | tuplerights) 867 | #Return the key: 868 | return key 869 | 870 | ##############################////////GUI FUNCTIONS\\\\\\\\\\\\\############################# 871 | def chess_coord_to_pixels(chess_coord): 872 | x,y = chess_coord 873 | #There are two sets of coordinates that this function could choose to return. 874 | #One is the coordinates that would be usually returned, the other is one that 875 | #would be returned if the board were to be flipped. 876 | #Note that square width and height variables are defined in the main function and 877 | #so are accessible here as global variables. 878 | if isAI: 879 | if AIPlayer==0: 880 | #This means you're playing against the AI and are playing as black: 881 | return ((7-x)*square_width, (7-y)*square_height) 882 | else: 883 | return (x*square_width, y*square_height) 884 | #Being here means two player game is being played. 885 | #If the flipping mode is enabled, and the player to play is black, 886 | #the board should flip, but not until the transition animation for 887 | #white movement is complete: 888 | if not isFlip or player==0 ^ isTransition: 889 | return (x*square_width, y*square_height) 890 | else: 891 | return ((7-x)*square_width, (7-y)*square_height) 892 | def pixel_coord_to_chess(pixel_coord): 893 | x,y = pixel_coord[0]/square_width, pixel_coord[1]/square_height 894 | #See comments for chess_coord_to_pixels() for an explanation of the 895 | #conditions seen here: 896 | if isAI: 897 | if AIPlayer==0: 898 | return (7-x,7-y) 899 | else: 900 | return (x,y) 901 | if not isFlip or player==0 ^ isTransition: 902 | return (x,y) 903 | else: 904 | return (7-x,7-y) 905 | def getPiece(chess_coord): 906 | for piece in listofWhitePieces+listofBlackPieces: 907 | #piece.getInfo()[0] represents the chess coordinate occupied 908 | #by piece. 909 | if piece.getInfo()[0] == chess_coord: 910 | return piece 911 | def createPieces(board): 912 | #Initialize containers: 913 | listofWhitePieces = [] 914 | listofBlackPieces = [] 915 | #Loop through all squares: 916 | for i in range(8): 917 | for k in range(8): 918 | if board[i][k]!=0: 919 | #The square is not empty, create a piece object: 920 | p = Piece(board[i][k],(k,i)) 921 | #Append the reference to the object to the appropriate 922 | #list: 923 | if board[i][k][1]=='w': 924 | listofWhitePieces.append(p) 925 | else: 926 | listofBlackPieces.append(p) 927 | #Return both: 928 | return [listofWhitePieces,listofBlackPieces] 929 | def createShades(listofTuples): 930 | global listofShades 931 | #Empty the list 932 | listofShades = [] 933 | if isTransition: 934 | #Nothing should be shaded when a piece is being animated: 935 | return 936 | if isDraw: 937 | #The game ended with a draw. Make yellow circle shades for 938 | #both the kings to show this is the case: 939 | coord = lookfor(board,'Kw')[0] 940 | shade = Shades(circle_image_yellow,coord) 941 | listofShades.append(shade) 942 | coord = lookfor(board,'Kb')[0] 943 | shade = Shades(circle_image_yellow,coord) 944 | listofShades.append(shade) 945 | #There is no need to go further: 946 | return 947 | if chessEnded: 948 | #The game has ended, with a checkmate because it cannot be a 949 | #draw if the code reached here. 950 | #Give the winning king a green circle shade: 951 | coord = lookfor(board,'K'+winner)[0] 952 | shade = Shades(circle_image_green_big,coord) 953 | listofShades.append(shade) 954 | #If either king is under attack, give them a red circle: 955 | if isCheck(position,'white'): 956 | coord = lookfor(board,'Kw')[0] 957 | shade = Shades(circle_image_red,coord) 958 | listofShades.append(shade) 959 | if isCheck(position,'black'): 960 | coord = lookfor(board,'Kb')[0] 961 | shade = Shades(circle_image_red,coord) 962 | listofShades.append(shade) 963 | #Go through all the target squares inputted: 964 | for pos in listofTuples: 965 | #If the target square is occupied, it can be captured. 966 | #For a capturable square, there is a different shade. 967 | #Create the appropriate shade for each target square: 968 | if isOccupied(board,pos[0],pos[1]): 969 | img = circle_image_capture 970 | else: 971 | img = circle_image_green 972 | shade = Shades(img,pos) 973 | #Append: 974 | listofShades.append(shade) 975 | def drawBoard(): 976 | #Blit the background: 977 | screen.blit(background,(0,0)) 978 | #Choose the order in which to blit the pieces. 979 | #If black is about to play for example, white pieces 980 | #should be blitted first, so that when black is capturing, 981 | #the piece appears above: 982 | if player==1: 983 | order = [listofWhitePieces,listofBlackPieces] 984 | else: 985 | order = [listofBlackPieces,listofWhitePieces] 986 | if isTransition: 987 | #If a piece is being animated, the player info is changed despite 988 | #white still capturing over black, for example. Reverse the order: 989 | order = list(reversed(order)) 990 | #The shades which appear during the following three conditions need to be 991 | #blitted first to appear under the pieces: 992 | if isDraw or chessEnded or isAIThink: 993 | #Shades 994 | for shade in listofShades: 995 | img,chess_coord = shade.getInfo() 996 | pixel_coord = chess_coord_to_pixels(chess_coord) 997 | screen.blit(img,pixel_coord) 998 | #Make shades to show what the previous move played was: 999 | if prevMove[0]!=-1 and not isTransition: 1000 | x,y,x2,y2 = prevMove 1001 | screen.blit(yellowbox_image,chess_coord_to_pixels((x,y))) 1002 | screen.blit(yellowbox_image,chess_coord_to_pixels((x2,y2))) 1003 | 1004 | #Blit the Pieces: 1005 | #Notw that one side has to be below the green circular shades to show 1006 | #that they are being targeted, and the other side if dragged to such 1007 | # a square should be blitted on top to show that it is capturing: 1008 | 1009 | #Potentially captured pieces: 1010 | for piece in order[0]: 1011 | 1012 | chess_coord,subsection,pos = piece.getInfo() 1013 | pixel_coord = chess_coord_to_pixels(chess_coord) 1014 | if pos==(-1,-1): 1015 | #Blit to default square: 1016 | screen.blit(pieces_image,pixel_coord,subsection) 1017 | else: 1018 | #Blit to the specific coordinates: 1019 | screen.blit(pieces_image,pos,subsection) 1020 | #Blit the shades in between: 1021 | if not (isDraw or chessEnded or isAIThink): 1022 | for shade in listofShades: 1023 | img,chess_coord = shade.getInfo() 1024 | pixel_coord = chess_coord_to_pixels(chess_coord) 1025 | screen.blit(img,pixel_coord) 1026 | #Potentially capturing pieces: 1027 | for piece in order[1]: 1028 | chess_coord,subsection,pos = piece.getInfo() 1029 | pixel_coord = chess_coord_to_pixels(chess_coord) 1030 | if pos==(-1,-1): 1031 | #Default square 1032 | screen.blit(pieces_image,pixel_coord,subsection) 1033 | else: 1034 | #Specifc pixels: 1035 | screen.blit(pieces_image,pos,subsection) 1036 | 1037 | ###########################////////AI RELATED FUNCTIONS\\\\\\\\\\############################ 1038 | 1039 | def negamax(position,depth,alpha,beta,colorsign,bestMoveReturn,root=True): 1040 | #First check if the position is already stored in the opening database dictionary: 1041 | if root: 1042 | #Generate key from current position: 1043 | key = pos2key(position) 1044 | if key in openings: 1045 | #Return the best move to be played: 1046 | bestMoveReturn[:] = random.choice(openings[key]) 1047 | return 1048 | #Access global variable that will store scores of positions already evaluated: 1049 | global searched 1050 | #If the depth is zero, we are at a leaf node (no more depth to be analysed): 1051 | if depth==0: 1052 | return colorsign*evaluate(position) 1053 | #Generate all the moves that can be played: 1054 | moves = allMoves(position, colorsign) 1055 | #If there are no moves to be played, just evaluate the position and return it: 1056 | if moves==[]: 1057 | return colorsign*evaluate(position) 1058 | #Initialize a best move for the root node: 1059 | if root: 1060 | bestMove = moves[0] 1061 | #Initialize the best move's value: 1062 | bestValue = -100000 1063 | #Go through each move: 1064 | for move in moves: 1065 | #Make a clone of the current move and perform the move on it: 1066 | newpos = position.clone() 1067 | makemove(newpos,move[0][0],move[0][1],move[1][0],move[1][1]) 1068 | #Generate the key for the new resulting position: 1069 | key = pos2key(newpos) 1070 | #If this position was already searched before, retrieve its node value. 1071 | #Otherwise, calculate its node value and store it in the dictionary: 1072 | if key in searched: 1073 | value = searched[key] 1074 | else: 1075 | value = -negamax(newpos,depth-1, -beta,-alpha,-colorsign,[],False) 1076 | searched[key] = value 1077 | #If this move is better than the best so far: 1078 | if value>bestValue: 1079 | #Store it 1080 | bestValue = value 1081 | #If we're at root node, store the move as the best move: 1082 | if root: 1083 | bestMove = move 1084 | #Update the lower bound for this node: 1085 | alpha = max(alpha,value) 1086 | if alpha>=beta: 1087 | #If our lower bound is higher than the upper bound for this node, there 1088 | #is no need to look at further moves: 1089 | break 1090 | #If this is the root node, return the best move: 1091 | if root: 1092 | searched = {} 1093 | bestMoveReturn[:] = bestMove 1094 | return 1095 | #Otherwise, return the bestValue (i.e. value for this node.) 1096 | return bestValue 1097 | def evaluate(position): 1098 | if isCheckmate(position,'white'): 1099 | #Major advantage to black 1100 | return -20000 1101 | if isCheckmate(position,'black'): 1102 | #Major advantage to white 1103 | return 20000 1104 | #Get the board: 1105 | board = position.getboard() 1106 | #Flatten the board to a 1D array for faster calculations: 1107 | flatboard = [x for row in board for x in row] 1108 | #Create a counter object to count number of each pieces: 1109 | c = Counter(flatboard) 1110 | Qw = c['Qw'] 1111 | Qb = c['Qb'] 1112 | Rw = c['Rw'] 1113 | Rb = c['Rb'] 1114 | Bw = c['Bw'] 1115 | Bb = c['Bb'] 1116 | Nw = c['Nw'] 1117 | Nb = c['Nb'] 1118 | Pw = c['Pw'] 1119 | Pb = c['Pb'] 1120 | #Note: The above choices to flatten the board and to use a library 1121 | #to count pieces were attempts at making the AI more efficient. 1122 | #Perhaps using a 1D board throughout the entire program is one way 1123 | #to make the code more efficient. 1124 | #Calculate amount of material on both sides and the number of moves 1125 | #played so far in order to determine game phase: 1126 | whiteMaterial = 9*Qw + 5*Rw + 3*Nw + 3*Bw + 1*Pw 1127 | blackMaterial = 9*Qb + 5*Rb + 3*Nb + 3*Bb + 1*Pb 1128 | numofmoves = len(position.gethistory()) 1129 | gamephase = 'opening' 1130 | if numofmoves>40 or (whiteMaterial<14 and blackMaterial<14): 1131 | gamephase = 'ending' 1132 | #A note again: Determining game phase is again one the attempts 1133 | #to make the AI smarter when analysing boards and has not been 1134 | #implemented to its full potential. 1135 | #Calculate number of doubled, blocked, and isolated pawns for 1136 | #both sides: 1137 | Dw = doubledPawns(board,'white') 1138 | Db = doubledPawns(board,'black') 1139 | Sw = blockedPawns(board,'white') 1140 | Sb = blockedPawns(board,'black') 1141 | Iw = isolatedPawns(board,'white') 1142 | Ib = isolatedPawns(board,'black') 1143 | #Evaluate position based on above data: 1144 | evaluation1 = 900*(Qw - Qb) + 500*(Rw - Rb) +330*(Bw-Bb 1145 | )+320*(Nw - Nb) +100*(Pw - Pb) +-30*(Dw-Db + Sw-Sb + Iw- Ib 1146 | ) 1147 | #Evaluate position based on piece square tables: 1148 | evaluation2 = pieceSquareTable(flatboard,gamephase) 1149 | #Sum the evaluations: 1150 | evaluation = evaluation1 + evaluation2 1151 | #Return it: 1152 | return evaluation 1153 | def pieceSquareTable(flatboard,gamephase): 1154 | #Initialize score: 1155 | score = 0 1156 | #Go through each square: 1157 | for i in range(64): 1158 | if flatboard[i]==0: 1159 | #Empty square 1160 | continue 1161 | #Get data: 1162 | piece = flatboard[i][0] 1163 | color = flatboard[i][1] 1164 | sign = +1 1165 | #Adjust index if black piece, since piece sqaure tables 1166 | #were designed for white: 1167 | if color=='b': 1168 | i = (7-i/8)*8 + i%8 1169 | sign = -1 1170 | #Adjust score: 1171 | if piece=='P': 1172 | score += sign*pawn_table[i] 1173 | elif piece=='N': 1174 | score+= sign*knight_table[i] 1175 | elif piece=='B': 1176 | score+=sign*bishop_table[i] 1177 | elif piece=='R': 1178 | score+=sign*rook_table[i] 1179 | elif piece=='Q': 1180 | score+=sign*queen_table[i] 1181 | elif piece=='K': 1182 | #King has different table values based on phase 1183 | #of the game: 1184 | if gamephase=='opening': 1185 | score+=sign*king_table[i] 1186 | else: 1187 | score+=sign*king_endgame_table[i] 1188 | return score 1189 | def doubledPawns(board,color): 1190 | color = color[0] 1191 | #Get indices of pawns: 1192 | listofpawns = lookfor(board,'P'+color) 1193 | #Count the number of doubled pawns by counting occurences of 1194 | #repeats in their x-coordinates: 1195 | repeats = 0 1196 | temp = [] 1197 | for pawnpos in listofpawns: 1198 | if pawnpos[0] in temp: 1199 | repeats = repeats + 1 1200 | else: 1201 | temp.append(pawnpos[0]) 1202 | return repeats 1203 | def blockedPawns(board,color): 1204 | color = color[0] 1205 | listofpawns = lookfor(board,'P'+color) 1206 | blocked = 0 1207 | #Self explanatory: 1208 | for pawnpos in listofpawns: 1209 | if ((color=='w' and isOccupiedby(board,pawnpos[0],pawnpos[1]-1, 1210 | 'black')) 1211 | or (color=='b' and isOccupiedby(board,pawnpos[0],pawnpos[1]+1, 1212 | 'white'))): 1213 | blocked = blocked + 1 1214 | return blocked 1215 | def isolatedPawns(board,color): 1216 | color = color[0] 1217 | listofpawns = lookfor(board,'P'+color) 1218 | #Get x coordinates of all the pawns: 1219 | xlist = [x for (x,y) in listofpawns] 1220 | isolated = 0 1221 | for x in xlist: 1222 | if x!=0 and x!=7: 1223 | #For non-edge cases: 1224 | if x-1 not in xlist and x+1 not in xlist: 1225 | isolated+=1 1226 | elif x==0 and 1 not in xlist: 1227 | #Left edge: 1228 | isolated+=1 1229 | elif x==7 and 6 not in xlist: 1230 | #Right edge: 1231 | isolated+=1 1232 | return isolated 1233 | 1234 | #########MAIN FUNCTION#################################################### 1235 | #Initialize the board: 1236 | board = [ ['Rb', 'Nb', 'Bb', 'Qb', 'Kb', 'Bb', 'Nb', 'Rb'], #8 1237 | ['Pb', 'Pb', 'Pb', 'Pb', 'Pb', 'Pb', 'Pb', 'Pb'], #7 1238 | [ 0, 0, 0, 0, 0, 0, 0, 0], #6 1239 | [ 0, 0, 0, 0, 0, 0, 0, 0], #5 1240 | [ 0, 0, 0, 0, 0, 0, 0, 0], #4 1241 | [ 0, 0, 0, 0, 0, 0, 0, 0], #3 1242 | ['Pw', 'Pw', 'Pw', 'Pw', 'Pw', 'Pw', 'Pw', 'Pw'], #2 1243 | ['Rw', 'Nw', 'Bw', 'Qw', 'Kw', 'Bw', 'Nw', 'Rw'] ]#1 1244 | # a b c d e f g h 1245 | 1246 | #In chess some data must be stored that is not apparent in the board: 1247 | player = 0 #This is the player that makes the next move. 0 is white, 1 is black 1248 | castling_rights = [[True, True],[True, True]] 1249 | #The above stores whether or not each of the players are permitted to castle on 1250 | #either side of the king. (Kingside, Queenside) 1251 | En_Passant_Target = -1 #This variable will store a coordinate if there is a square that can be 1252 | #en passant captured on. Otherwise it stores -1, indicating lack of en passant 1253 | #targets. 1254 | half_move_clock = 0 #This variable stores the number of reversible moves that have been played so far. 1255 | #Generate an instance of GamePosition class to store the above data: 1256 | position = GamePosition(board,player,castling_rights,En_Passant_Target 1257 | ,half_move_clock) 1258 | #Store the piece square tables here so they can be accessed globally by pieceSquareTable() function: 1259 | pawn_table = [ 0, 0, 0, 0, 0, 0, 0, 0, 1260 | 50, 50, 50, 50, 50, 50, 50, 50, 1261 | 10, 10, 20, 30, 30, 20, 10, 10, 1262 | 5, 5, 10, 25, 25, 10, 5, 5, 1263 | 0, 0, 0, 20, 20, 0, 0, 0, 1264 | 5, -5,-10, 0, 0,-10, -5, 5, 1265 | 5, 10, 10,-20,-20, 10, 10, 5, 1266 | 0, 0, 0, 0, 0, 0, 0, 0] 1267 | knight_table = [-50,-40,-30,-30,-30,-30,-40,-50, 1268 | -40,-20, 0, 0, 0, 0,-20,-40, 1269 | -30, 0, 10, 15, 15, 10, 0,-30, 1270 | -30, 5, 15, 20, 20, 15, 5,-30, 1271 | -30, 0, 15, 20, 20, 15, 0,-30, 1272 | -30, 5, 10, 15, 15, 10, 5,-30, 1273 | -40,-20, 0, 5, 5, 0,-20,-40, 1274 | -50,-90,-30,-30,-30,-30,-90,-50] 1275 | bishop_table = [-20,-10,-10,-10,-10,-10,-10,-20, 1276 | -10, 0, 0, 0, 0, 0, 0,-10, 1277 | -10, 0, 5, 10, 10, 5, 0,-10, 1278 | -10, 5, 5, 10, 10, 5, 5,-10, 1279 | -10, 0, 10, 10, 10, 10, 0,-10, 1280 | -10, 10, 10, 10, 10, 10, 10,-10, 1281 | -10, 5, 0, 0, 0, 0, 5,-10, 1282 | -20,-10,-90,-10,-10,-90,-10,-20] 1283 | rook_table = [0, 0, 0, 0, 0, 0, 0, 0, 1284 | 5, 10, 10, 10, 10, 10, 10, 5, 1285 | -5, 0, 0, 0, 0, 0, 0, -5, 1286 | -5, 0, 0, 0, 0, 0, 0, -5, 1287 | -5, 0, 0, 0, 0, 0, 0, -5, 1288 | -5, 0, 0, 0, 0, 0, 0, -5, 1289 | -5, 0, 0, 0, 0, 0, 0, -5, 1290 | 0, 0, 0, 5, 5, 0, 0, 0] 1291 | queen_table = [-20,-10,-10, -5, -5,-10,-10,-20, 1292 | -10, 0, 0, 0, 0, 0, 0,-10, 1293 | -10, 0, 5, 5, 5, 5, 0,-10, 1294 | -5, 0, 5, 5, 5, 5, 0, -5, 1295 | 0, 0, 5, 5, 5, 5, 0, -5, 1296 | -10, 5, 5, 5, 5, 5, 0,-10, 1297 | -10, 0, 5, 0, 0, 0, 0,-10, 1298 | -20,-10,-10, 70, -5,-10,-10,-20] 1299 | king_table = [-30,-40,-40,-50,-50,-40,-40,-30, 1300 | -30,-40,-40,-50,-50,-40,-40,-30, 1301 | -30,-40,-40,-50,-50,-40,-40,-30, 1302 | -30,-40,-40,-50,-50,-40,-40,-30, 1303 | -20,-30,-30,-40,-40,-30,-30,-20, 1304 | -10,-20,-20,-20,-20,-20,-20,-10, 1305 | 20, 20, 0, 0, 0, 0, 20, 20, 1306 | 20, 30, 10, 0, 0, 10, 30, 20] 1307 | king_endgame_table = [-50,-40,-30,-20,-20,-30,-40,-50, 1308 | -30,-20,-10, 0, 0,-10,-20,-30, 1309 | -30,-10, 20, 30, 30, 20,-10,-30, 1310 | -30,-10, 30, 40, 40, 30,-10,-30, 1311 | -30,-10, 30, 40, 40, 30,-10,-30, 1312 | -30,-10, 20, 30, 30, 20,-10,-30, 1313 | -30,-30, 0, 0, 0, 0,-30,-30, 1314 | -50,-30,-30,-30,-30,-30,-30,-50] 1315 | 1316 | #Make the GUI: 1317 | #Start pygame 1318 | pygame.init() 1319 | #Load the screen with any arbitrary size for now: 1320 | screen = pygame.display.set_mode((600,600)) 1321 | 1322 | #Load all the images: 1323 | #Load the background chess board image: 1324 | background = pygame.image.load(os.path.join('Media','board.png')).convert() 1325 | #Load an image with all the pieces on it: 1326 | pieces_image = pygame.image.load(os.path.join('Media','Chess_Pieces_Sprite.png')).convert_alpha() 1327 | circle_image_green = pygame.image.load(os.path.join('Media','green_circle_small.png')).convert_alpha() 1328 | circle_image_capture = pygame.image.load(os.path.join('Media','green_circle_neg.png')).convert_alpha() 1329 | circle_image_red = pygame.image.load(os.path.join('Media','red_circle_big.png')).convert_alpha() 1330 | greenbox_image = pygame.image.load(os.path.join('Media','green_box.png')).convert_alpha() 1331 | circle_image_yellow = pygame.image.load(os.path.join('Media','yellow_circle_big.png')).convert_alpha() 1332 | circle_image_green_big = pygame.image.load(os.path.join('Media','green_circle_big.png')).convert_alpha() 1333 | yellowbox_image = pygame.image.load(os.path.join('Media','yellow_box.png')).convert_alpha() 1334 | #Menu pictures: 1335 | withfriend_pic = pygame.image.load(os.path.join('Media','withfriend.png')).convert_alpha() 1336 | withAI_pic = pygame.image.load(os.path.join('Media','withAI.png')).convert_alpha() 1337 | playwhite_pic = pygame.image.load(os.path.join('Media','playWhite.png')).convert_alpha() 1338 | playblack_pic = pygame.image.load(os.path.join('Media','playBlack.png')).convert_alpha() 1339 | flipEnabled_pic = pygame.image.load(os.path.join('Media','flipEnabled.png')).convert_alpha() 1340 | flipDisabled_pic = pygame.image.load(os.path.join('Media','flipDisabled.png')).convert_alpha() 1341 | 1342 | #Getting sizes: 1343 | #Get background size: 1344 | size_of_bg = background.get_rect().size 1345 | #Get size of the individual squares 1346 | square_width = size_of_bg[0]/8 1347 | square_height = size_of_bg[1]/8 1348 | 1349 | 1350 | #Rescale the images so that each piece can fit in a square: 1351 | pieces_image = pygame.transform.scale(pieces_image, 1352 | (square_width*6,square_height*2)) 1353 | circle_image_green = pygame.transform.scale(circle_image_green, 1354 | (square_width, square_height)) 1355 | circle_image_capture = pygame.transform.scale(circle_image_capture, 1356 | (square_width, square_height)) 1357 | circle_image_red = pygame.transform.scale(circle_image_red, 1358 | (square_width, square_height)) 1359 | greenbox_image = pygame.transform.scale(greenbox_image, 1360 | (square_width, square_height)) 1361 | yellowbox_image = pygame.transform.scale(yellowbox_image, 1362 | (square_width, square_height)) 1363 | circle_image_yellow = pygame.transform.scale(circle_image_yellow, 1364 | (square_width, square_height)) 1365 | circle_image_green_big = pygame.transform.scale(circle_image_green_big, 1366 | (square_width, square_height)) 1367 | withfriend_pic = pygame.transform.scale(withfriend_pic, 1368 | (square_width*4,square_height*4)) 1369 | withAI_pic = pygame.transform.scale(withAI_pic, 1370 | (square_width*4,square_height*4)) 1371 | playwhite_pic = pygame.transform.scale(playwhite_pic, 1372 | (square_width*4,square_height*4)) 1373 | playblack_pic = pygame.transform.scale(playblack_pic, 1374 | (square_width*4,square_height*4)) 1375 | flipEnabled_pic = pygame.transform.scale(flipEnabled_pic, 1376 | (square_width*4,square_height*4)) 1377 | flipDisabled_pic = pygame.transform.scale(flipDisabled_pic, 1378 | (square_width*4,square_height*4)) 1379 | 1380 | 1381 | 1382 | #Make a window of the same size as the background, set its title, and 1383 | #load the background image onto it (the board): 1384 | screen = pygame.display.set_mode(size_of_bg) 1385 | pygame.display.set_caption('Shallow Green') 1386 | screen.blit(background,(0,0)) 1387 | 1388 | #Generate a list of pieces that should be drawn on the board: 1389 | listofWhitePieces,listofBlackPieces = createPieces(board) 1390 | #(the list contains references to objects of the class Piece) 1391 | #Initialize a list of shades: 1392 | listofShades = [] 1393 | 1394 | clock = pygame.time.Clock() #Helps controlling fps of the game. 1395 | isDown = False #Variable that shows if the mouse is being held down 1396 | #onto a piece 1397 | isClicked = False #To keep track of whether a piece was clicked in order 1398 | #to indicate intention to move by the user. 1399 | isTransition = False #Keeps track of whether or not a piece is being animated. 1400 | isDraw = False #Will store True if the game ended with a draw 1401 | chessEnded = False #Will become True once the chess game ends by checkmate, stalemate, etc. 1402 | isRecord = False #Set this to True if you want to record moves to the Opening Book. Do not 1403 | #set this to True unless you're 100% sure of what you're doing. The program will never modify 1404 | #this value. 1405 | isAIThink = False #Stores whether or not the AI is calculating the best move to be played. 1406 | # Initialize the opening book dictionary, and set its values to be lists by default: 1407 | openings = defaultdict(list) 1408 | #If openingTable.txt exists, read from it and load the opening moves to the local dictionary. 1409 | #If it doesn't, create a new one to write to if Recording is enabled: 1410 | try: 1411 | file_handle = open('openingTable.txt','r+') 1412 | openings = pickle.loads(file_handle.read()) 1413 | except: 1414 | if isRecord: 1415 | file_handle = open('openingTable.txt','w') 1416 | 1417 | searched = {} #Global variable that allows negamax to keep track of nodes that have 1418 | #already been evaluated. 1419 | prevMove = [-1,-1,-1,-1] #Also a global varible that stores the last move played, to 1420 | #allow drawBoard() to create Shades on the squares. 1421 | #Initialize some more values: 1422 | #For animating AI thinking graphics: 1423 | ax,ay=0,0 1424 | numm = 0 1425 | #For showing the menu and keeping track of user choices: 1426 | isMenu = True 1427 | isAI = -1 1428 | isFlip = -1 1429 | AIPlayer = -1 1430 | #Finally, a variable to keep false until the user wants to quit: 1431 | gameEnded = False 1432 | #########################INFINITE LOOP##################################### 1433 | #The program remains in this loop until the user quits the application 1434 | while not gameEnded: 1435 | if isMenu: 1436 | #Menu needs to be shown right now. 1437 | #Blit the background: 1438 | screen.blit(background,(0,0)) 1439 | if isAI==-1: 1440 | #The user has not selected between playing against the AI 1441 | #or playing against a friend. 1442 | #So allow them to choose between playing with a friend or the AI: 1443 | screen.blit(withfriend_pic,(0,square_height*2)) 1444 | screen.blit(withAI_pic,(square_width*4,square_height*2)) 1445 | elif isAI==True: 1446 | #The user has selected to play against the AI. 1447 | #Allow the user to play as white or black: 1448 | screen.blit(playwhite_pic,(0,square_height*2)) 1449 | screen.blit(playblack_pic,(square_width*4,square_height*2)) 1450 | elif isAI==False: 1451 | #The user has selected to play with a friend. 1452 | #Allow choice of flipping the board or not flipping the board: 1453 | screen.blit(flipDisabled_pic,(0,square_height*2)) 1454 | screen.blit(flipEnabled_pic,(square_width*4,square_height*2)) 1455 | if isFlip!=-1: 1456 | #All settings have already been specified. 1457 | #Draw all the pieces onto the board: 1458 | drawBoard() 1459 | #Don't let the menu ever appear again: 1460 | isMenu = False 1461 | #In case the player chose to play against the AI and decided to 1462 | #play as black, call upon the AI to make a move: 1463 | if isAI and AIPlayer==0: 1464 | colorsign=1 1465 | bestMoveReturn = [] 1466 | move_thread = threading.Thread(target = negamax, 1467 | args = (position,3,-1000000,1000000,colorsign,bestMoveReturn)) 1468 | move_thread.start() 1469 | isAIThink = True 1470 | continue 1471 | for event in pygame.event.get(): 1472 | #Handle the events while in menu: 1473 | if event.type==QUIT: 1474 | #Window was closed. 1475 | gameEnded = True 1476 | break 1477 | if event.type == MOUSEBUTTONUP: 1478 | #The mouse was clicked somewhere. 1479 | #Get the coordinates of click: 1480 | pos = pygame.mouse.get_pos() 1481 | #Determine if left box was clicked or right box. 1482 | #Then choose an appropriate action based on current 1483 | #state of menu: 1484 | if (pos[0]square_height*2 and 1486 | pos[1]square_width*4 and 1496 | pos[1]>square_height*2 and 1497 | pos[1]=100 or isStalemate(position) or position.checkRepition(): 1642 | #There is a draw: 1643 | isDraw = True 1644 | chessEnded = True 1645 | #Check for possibilty of checkmate: 1646 | if isCheckmate(position,'white'): 1647 | winner = 'b' 1648 | chessEnded = True 1649 | if isCheckmate(position,'black'): 1650 | winner = 'w' 1651 | chessEnded = True 1652 | #If the AI option was selecteed and the game still hasn't finished, 1653 | #let the AI start thinking about its next move: 1654 | if isAI and not chessEnded: 1655 | if player==0: 1656 | colorsign = 1 1657 | else: 1658 | colorsign = -1 1659 | bestMoveReturn = [] 1660 | move_thread = threading.Thread(target = negamax, 1661 | args = (position,3,-1000000,1000000,colorsign,bestMoveReturn)) 1662 | move_thread.start() 1663 | isAIThink = True 1664 | #Move the piece to its new destination: 1665 | dragPiece.setcoord((x2,y2)) 1666 | #There may have been a capture, so the piece list should be regenerated. 1667 | #However, if animation is ocurring, the the captured piece should still remain visible. 1668 | if not isTransition: 1669 | listofWhitePieces,listofBlackPieces = createPieces(board) 1670 | else: 1671 | movingPiece = dragPiece 1672 | origin = chess_coord_to_pixels((x,y)) 1673 | destiny = chess_coord_to_pixels((x2,y2)) 1674 | movingPiece.setpos(origin) 1675 | step = (destiny[0]-origin[0],destiny[1]-origin[1]) 1676 | 1677 | #Either way shades should be deleted now: 1678 | createShades([]) 1679 | #If an animation is supposed to happen, make it happen: 1680 | if isTransition: 1681 | p,q = movingPiece.getpos() 1682 | dx2,dy2 = destiny 1683 | n= 30.0 1684 | if abs(p-dx2)<=abs(step[0]/n) and abs(q-dy2)<=abs(step[1]/n): 1685 | #The moving piece has reached its destination: 1686 | #Snap it back to its grid position: 1687 | movingPiece.setpos((-1,-1)) 1688 | #Generate new piece list in case one got captured: 1689 | listofWhitePieces,listofBlackPieces = createPieces(board) 1690 | #No more transitioning: 1691 | isTransition = False 1692 | createShades([]) 1693 | else: 1694 | #Move it closer to its destination. 1695 | movingPiece.setpos((p+step[0]/n,q+step[1]/n)) 1696 | #If a piece is being dragged let the dragging piece follow the mouse: 1697 | if isDown: 1698 | m,k = pygame.mouse.get_pos() 1699 | dragPiece.setpos((m-square_width/2,k-square_height/2)) 1700 | #If the AI is thinking, make sure to check if it isn't done thinking yet. 1701 | #Also, if a piece is currently being animated don't ask the AI if it's 1702 | #done thining, in case it replied in the affirmative and starts moving 1703 | #at the same time as your piece is moving: 1704 | if isAIThink and not isTransition: 1705 | if not move_thread.isAlive(): 1706 | #The AI has made a decision. 1707 | #It's no longer thinking 1708 | isAIThink = False 1709 | #Destroy any shades: 1710 | createShades([]) 1711 | #Get the move proposed: 1712 | [x,y],[x2,y2] = bestMoveReturn 1713 | #Do everything just as if the user made a move by click-click movement: 1714 | makemove(position,x,y,x2,y2) 1715 | prevMove = [x,y,x2,y2] 1716 | player = position.getplayer() 1717 | HMC = position.getHMC() 1718 | position.addtoHistory(position) 1719 | if HMC>=100 or isStalemate(position) or position.checkRepition(): 1720 | isDraw = True 1721 | chessEnded = True 1722 | if isCheckmate(position,'white'): 1723 | winner = 'b' 1724 | chessEnded = True 1725 | if isCheckmate(position,'black'): 1726 | winner = 'w' 1727 | chessEnded = True 1728 | #Animate the movement: 1729 | isTransition = True 1730 | movingPiece = getPiece((x,y)) 1731 | origin = chess_coord_to_pixels((x,y)) 1732 | destiny = chess_coord_to_pixels((x2,y2)) 1733 | movingPiece.setpos(origin) 1734 | step = (destiny[0]-origin[0],destiny[1]-origin[1]) 1735 | 1736 | #Update positions of all images: 1737 | drawBoard() 1738 | #Update the display: 1739 | pygame.display.update() 1740 | 1741 | #Run at specific fps: 1742 | clock.tick(60) 1743 | 1744 | #Out of loop. Quit pygame: 1745 | pygame.quit() 1746 | #In case recording mode was on, save the openings dictionary to a file: 1747 | if isRecord: 1748 | file_handle.seek(0) 1749 | pickle.dump(openings,file_handle) 1750 | file_handle.truncate() 1751 | file_handle.close() -------------------------------------------------------------------------------- /Chess/openingTable.txt: -------------------------------------------------------------------------------- 1 | ccollections 2 | defaultdict 3 | p0 4 | (c__builtin__ 5 | list 6 | p1 7 | tp2 8 | Rp3 9 | (((S'Rb' 10 | p4 11 | S'Nb' 12 | p5 13 | S'Bb' 14 | p6 15 | S'Qb' 16 | p7 17 | S'Kb' 18 | p8 19 | g6 20 | g5 21 | g4 22 | tp9 23 | (S'Pb' 24 | p10 25 | g10 26 | g10 27 | I0 28 | I0 29 | g10 30 | g10 31 | g10 32 | tp11 33 | (I0 34 | I0 35 | I0 36 | I0 37 | g10 38 | I0 39 | I0 40 | I0 41 | tp12 42 | (I0 43 | I0 44 | I0 45 | g10 46 | I0 47 | I0 48 | I0 49 | I0 50 | tp13 51 | (I0 52 | I0 53 | S'Pw' 54 | p14 55 | g14 56 | I0 57 | I0 58 | I0 59 | I0 60 | tp15 61 | (I0 62 | I0 63 | S'Nw' 64 | p16 65 | I0 66 | I0 67 | I0 68 | I0 69 | I0 70 | tp17 71 | (g14 72 | g14 73 | I0 74 | I0 75 | g14 76 | g14 77 | g14 78 | g14 79 | tp18 80 | (S'Rw' 81 | p19 82 | I0 83 | S'Bw' 84 | p20 85 | S'Qw' 86 | p21 87 | S'Kw' 88 | p22 89 | g20 90 | g16 91 | g19 92 | tp23 93 | tp24 94 | I1 95 | ((I01 96 | I01 97 | tp25 98 | (I01 99 | I01 100 | tp26 101 | tp27 102 | tp28 103 | (lp29 104 | (lp30 105 | (I6 106 | I0 107 | tp31 108 | a(I5 109 | I2 110 | tp32 111 | aas(((S'Rb' 112 | p33 113 | S'Nb' 114 | p34 115 | S'Bb' 116 | p35 117 | S'Qb' 118 | p36 119 | S'Kb' 120 | p37 121 | I0 122 | I0 123 | g33 124 | tp38 125 | (S'Pb' 126 | p39 127 | g39 128 | g39 129 | g39 130 | g39 131 | g39 132 | g35 133 | g39 134 | tp40 135 | (I0 136 | I0 137 | I0 138 | I0 139 | I0 140 | g34 141 | g39 142 | I0 143 | tp41 144 | (I0 145 | I0 146 | I0 147 | I0 148 | I0 149 | I0 150 | I0 151 | I0 152 | tp42 153 | (I0 154 | I0 155 | S'Pw' 156 | p43 157 | g43 158 | I0 159 | I0 160 | I0 161 | I0 162 | tp44 163 | (I0 164 | I0 165 | S'Nw' 166 | p45 167 | I0 168 | I0 169 | I0 170 | I0 171 | I0 172 | tp46 173 | (g43 174 | g43 175 | I0 176 | I0 177 | g43 178 | g43 179 | g43 180 | g43 181 | tp47 182 | (S'Rw' 183 | p48 184 | I0 185 | S'Bw' 186 | p49 187 | S'Qw' 188 | p50 189 | S'Kw' 190 | p51 191 | g49 192 | g45 193 | g48 194 | tp52 195 | tp53 196 | I0 197 | ((I01 198 | I01 199 | tp54 200 | (I01 201 | I01 202 | tp55 203 | tp56 204 | tp57 205 | (lp58 206 | (lp59 207 | (I4 208 | I6 209 | tp60 210 | a(I4 211 | I4 212 | tp61 213 | aas(((S'Rb' 214 | p62 215 | S'Nb' 216 | p63 217 | S'Bb' 218 | p64 219 | S'Qb' 220 | p65 221 | S'Kb' 222 | p66 223 | g64 224 | I0 225 | g62 226 | tp67 227 | (S'Pb' 228 | p68 229 | g68 230 | I0 231 | I0 232 | g68 233 | g68 234 | g68 235 | g68 236 | tp69 237 | (I0 238 | I0 239 | I0 240 | g68 241 | I0 242 | g63 243 | I0 244 | I0 245 | tp70 246 | (I0 247 | I0 248 | I0 249 | I0 250 | I0 251 | I0 252 | I0 253 | I0 254 | tp71 255 | (I0 256 | I0 257 | I0 258 | S'Nw' 259 | p72 260 | S'Pw' 261 | p73 262 | I0 263 | I0 264 | I0 265 | tp74 266 | (I0 267 | I0 268 | I0 269 | I0 270 | I0 271 | I0 272 | I0 273 | I0 274 | tp75 275 | (g73 276 | g73 277 | g73 278 | I0 279 | I0 280 | g73 281 | g73 282 | g73 283 | tp76 284 | (S'Rw' 285 | p77 286 | g72 287 | S'Bw' 288 | p78 289 | S'Qw' 290 | p79 291 | S'Kw' 292 | p80 293 | g78 294 | I0 295 | g77 296 | tp81 297 | tp82 298 | I0 299 | ((I01 300 | I01 301 | tp83 302 | (I01 303 | I01 304 | tp84 305 | tp85 306 | tp86 307 | (lp87 308 | (lp88 309 | (I1 310 | I7 311 | tp89 312 | a(I2 313 | I5 314 | tp90 315 | aas(((g4 316 | g5 317 | g6 318 | S'Qb' 319 | p91 320 | g8 321 | g6 322 | g5 323 | g4 324 | tp92 325 | (g10 326 | g10 327 | g10 328 | I0 329 | g10 330 | g10 331 | g10 332 | g10 333 | tp93 334 | (I0 335 | I0 336 | I0 337 | I0 338 | I0 339 | I0 340 | I0 341 | I0 342 | tp94 343 | (I0 344 | I0 345 | I0 346 | g10 347 | I0 348 | I0 349 | I0 350 | I0 351 | tp95 352 | (I0 353 | I0 354 | I0 355 | g14 356 | I0 357 | I0 358 | I0 359 | I0 360 | tp96 361 | (I0 362 | I0 363 | I0 364 | I0 365 | I0 366 | I0 367 | I0 368 | I0 369 | tp97 370 | (g14 371 | g14 372 | g14 373 | I0 374 | g14 375 | g14 376 | g14 377 | g14 378 | tp98 379 | (g19 380 | g16 381 | g20 382 | S'Qw' 383 | p99 384 | g22 385 | g20 386 | g16 387 | g19 388 | tp100 389 | tp101 390 | I0 391 | ((I01 392 | I01 393 | tp102 394 | (I01 395 | I01 396 | tp103 397 | tp104 398 | tp105 399 | (lp106 400 | (lp107 401 | (I2 402 | I6 403 | tp108 404 | a(I2 405 | I4 406 | tp109 407 | aas(((S'Rb' 408 | p110 409 | S'Nb' 410 | p111 411 | S'Bb' 412 | p112 413 | S'Qb' 414 | p113 415 | I0 416 | S'Rb' 417 | p114 418 | S'Kb' 419 | p115 420 | I0 421 | tp116 422 | (S'Pb' 423 | p117 424 | g117 425 | g117 426 | g117 427 | I0 428 | g117 429 | g117 430 | g117 431 | tp118 432 | (I0 433 | I0 434 | I0 435 | I0 436 | g117 437 | g111 438 | I0 439 | I0 440 | tp119 441 | (I0 442 | I0 443 | I0 444 | I0 445 | I0 446 | I0 447 | I0 448 | I0 449 | tp120 450 | (I0 451 | g112 452 | S'Pw' 453 | p121 454 | g121 455 | I0 456 | I0 457 | I0 458 | I0 459 | tp122 460 | (I0 461 | I0 462 | S'Nw' 463 | p123 464 | S'Bw' 465 | p124 466 | g121 467 | I0 468 | I0 469 | I0 470 | tp125 471 | (g121 472 | g121 473 | I0 474 | I0 475 | I0 476 | g121 477 | g121 478 | g121 479 | tp126 480 | (S'Rw' 481 | p127 482 | I0 483 | g124 484 | S'Qw' 485 | p128 486 | S'Kw' 487 | p129 488 | I0 489 | g123 490 | g127 491 | tp130 492 | tp131 493 | I1 494 | ((I01 495 | I01 496 | tp132 497 | (I00 498 | I00 499 | tp133 500 | tp134 501 | tp135 502 | (lp136 503 | (lp137 504 | (I3 505 | I1 506 | tp138 507 | a(I3 508 | I3 509 | tp139 510 | aas(((S'Rb' 511 | p140 512 | S'Nb' 513 | p141 514 | S'Bb' 515 | p142 516 | S'Qb' 517 | p143 518 | S'Kb' 519 | p144 520 | g142 521 | g141 522 | g140 523 | tp145 524 | (S'Pb' 525 | p146 526 | g146 527 | g146 528 | I0 529 | I0 530 | g146 531 | g146 532 | g146 533 | tp147 534 | (I0 535 | I0 536 | I0 537 | I0 538 | g146 539 | I0 540 | I0 541 | I0 542 | tp148 543 | (I0 544 | I0 545 | I0 546 | g146 547 | I0 548 | I0 549 | I0 550 | I0 551 | tp149 552 | (I0 553 | I0 554 | I0 555 | S'Pw' 556 | p150 557 | g150 558 | I0 559 | I0 560 | I0 561 | tp151 562 | (I0 563 | I0 564 | S'Nw' 565 | p152 566 | I0 567 | I0 568 | I0 569 | I0 570 | I0 571 | tp153 572 | (g150 573 | g150 574 | g150 575 | I0 576 | I0 577 | g150 578 | g150 579 | g150 580 | tp154 581 | (S'Rw' 582 | p155 583 | I0 584 | S'Bw' 585 | p156 586 | S'Qw' 587 | p157 588 | S'Kw' 589 | p158 590 | g156 591 | g152 592 | g155 593 | tp159 594 | tp160 595 | I1 596 | ((I01 597 | I01 598 | tp161 599 | (I01 600 | I01 601 | tp162 602 | tp163 603 | tp164 604 | (lp165 605 | (lp166 606 | (I5 607 | I0 608 | tp167 609 | a(I1 610 | I4 611 | tp168 612 | aas(((S'Rb' 613 | p169 614 | S'Nb' 615 | p170 616 | S'Bb' 617 | p171 618 | S'Qb' 619 | p172 620 | S'Kb' 621 | p173 622 | g171 623 | g170 624 | g169 625 | tp174 626 | (S'Pb' 627 | p175 628 | g175 629 | g175 630 | I0 631 | I0 632 | g175 633 | g175 634 | g175 635 | tp176 636 | (I0 637 | I0 638 | I0 639 | g175 640 | I0 641 | I0 642 | I0 643 | I0 644 | tp177 645 | (I0 646 | I0 647 | I0 648 | I0 649 | I0 650 | I0 651 | I0 652 | I0 653 | tp178 654 | (I0 655 | I0 656 | I0 657 | g175 658 | S'Pw' 659 | p179 660 | I0 661 | I0 662 | I0 663 | tp180 664 | (I0 665 | I0 666 | I0 667 | I0 668 | I0 669 | S'Nw' 670 | p181 671 | I0 672 | I0 673 | tp182 674 | (g179 675 | g179 676 | g179 677 | I0 678 | I0 679 | g179 680 | g179 681 | g179 682 | tp183 683 | (S'Rw' 684 | p184 685 | g181 686 | S'Bw' 687 | p185 688 | S'Qw' 689 | p186 690 | S'Kw' 691 | p187 692 | g185 693 | I0 694 | g184 695 | tp188 696 | tp189 697 | I0 698 | ((I01 699 | I01 700 | tp190 701 | (I01 702 | I01 703 | tp191 704 | tp192 705 | tp193 706 | (lp194 707 | (lp195 708 | (I5 709 | I5 710 | tp196 711 | a(I3 712 | I4 713 | tp197 714 | aas(((g33 715 | g34 716 | g35 717 | S'Qb' 718 | p198 719 | g37 720 | g35 721 | I0 722 | g33 723 | tp199 724 | (g39 725 | g39 726 | g39 727 | g39 728 | g39 729 | g39 730 | I0 731 | g39 732 | tp200 733 | (I0 734 | I0 735 | I0 736 | I0 737 | I0 738 | g34 739 | g39 740 | I0 741 | tp201 742 | (I0 743 | I0 744 | I0 745 | I0 746 | I0 747 | I0 748 | I0 749 | I0 750 | tp202 751 | (I0 752 | I0 753 | g43 754 | g43 755 | I0 756 | I0 757 | I0 758 | I0 759 | tp203 760 | (I0 761 | I0 762 | g45 763 | I0 764 | I0 765 | I0 766 | I0 767 | I0 768 | tp204 769 | (g43 770 | g43 771 | I0 772 | I0 773 | g43 774 | g43 775 | g43 776 | g43 777 | tp205 778 | (g48 779 | I0 780 | g49 781 | S'Qw' 782 | p206 783 | g51 784 | g49 785 | g45 786 | g48 787 | tp207 788 | tp208 789 | I1 790 | ((I01 791 | I01 792 | tp209 793 | (I01 794 | I01 795 | tp210 796 | tp211 797 | tp212 798 | (lp213 799 | (lp214 800 | (I5 801 | I0 802 | tp215 803 | a(I6 804 | I1 805 | tp216 806 | aas(((g140 807 | g141 808 | g142 809 | S'Qb' 810 | p217 811 | g144 812 | g142 813 | g141 814 | g140 815 | tp218 816 | (g146 817 | g146 818 | g146 819 | g146 820 | I0 821 | g146 822 | g146 823 | g146 824 | tp219 825 | (I0 826 | I0 827 | I0 828 | I0 829 | g146 830 | I0 831 | I0 832 | I0 833 | tp220 834 | (I0 835 | I0 836 | I0 837 | I0 838 | I0 839 | I0 840 | I0 841 | I0 842 | tp221 843 | (I0 844 | I0 845 | I0 846 | I0 847 | g150 848 | I0 849 | I0 850 | I0 851 | tp222 852 | (I0 853 | I0 854 | I0 855 | I0 856 | I0 857 | I0 858 | I0 859 | I0 860 | tp223 861 | (g150 862 | g150 863 | g150 864 | g150 865 | I0 866 | g150 867 | g150 868 | g150 869 | tp224 870 | (g155 871 | g152 872 | g156 873 | S'Qw' 874 | p225 875 | g158 876 | g156 877 | g152 878 | g155 879 | tp226 880 | tp227 881 | I0 882 | ((I01 883 | I01 884 | tp228 885 | (I01 886 | I01 887 | tp229 888 | tp230 889 | tp231 890 | (lp232 891 | (lp233 892 | (I3 893 | I6 894 | tp234 895 | a(I3 896 | I4 897 | tp235 898 | aas(((S'Rb' 899 | p236 900 | I0 901 | S'Bb' 902 | p237 903 | S'Qb' 904 | p238 905 | S'Kb' 906 | p239 907 | g237 908 | S'Nb' 909 | p240 910 | g236 911 | tp241 912 | (S'Pb' 913 | p242 914 | g242 915 | g242 916 | g242 917 | I0 918 | g242 919 | g242 920 | g242 921 | tp243 922 | (I0 923 | I0 924 | g240 925 | I0 926 | I0 927 | I0 928 | I0 929 | I0 930 | tp244 931 | (I0 932 | I0 933 | I0 934 | I0 935 | g242 936 | I0 937 | I0 938 | I0 939 | tp245 940 | (I0 941 | I0 942 | S'Bw' 943 | p246 944 | I0 945 | S'Pw' 946 | p247 947 | I0 948 | I0 949 | I0 950 | tp248 951 | (I0 952 | I0 953 | I0 954 | I0 955 | I0 956 | S'Nw' 957 | p249 958 | I0 959 | I0 960 | tp250 961 | (g247 962 | g247 963 | g247 964 | g247 965 | I0 966 | g247 967 | g247 968 | g247 969 | tp251 970 | (S'Rw' 971 | p252 972 | g249 973 | g246 974 | S'Qw' 975 | p253 976 | S'Kw' 977 | p254 978 | I0 979 | I0 980 | g252 981 | tp255 982 | tp256 983 | I1 984 | ((I01 985 | I01 986 | tp257 987 | (I01 988 | I01 989 | tp258 990 | tp259 991 | tp260 992 | (lp261 993 | (lp262 994 | (I5 995 | I0 996 | tp263 997 | a(I2 998 | I3 999 | tp264 1000 | aas(((g33 1001 | g34 1002 | g35 1003 | S'Qb' 1004 | p265 1005 | I0 1006 | S'Rb' 1007 | p266 1008 | g37 1009 | I0 1010 | tp267 1011 | (g39 1012 | g39 1013 | g39 1014 | I0 1015 | I0 1016 | g39 1017 | g35 1018 | g39 1019 | tp268 1020 | (I0 1021 | I0 1022 | I0 1023 | g39 1024 | I0 1025 | g34 1026 | g39 1027 | I0 1028 | tp269 1029 | (I0 1030 | I0 1031 | I0 1032 | I0 1033 | g39 1034 | I0 1035 | I0 1036 | I0 1037 | tp270 1038 | (I0 1039 | I0 1040 | g43 1041 | g43 1042 | g43 1043 | I0 1044 | I0 1045 | I0 1046 | tp271 1047 | (I0 1048 | I0 1049 | g45 1050 | I0 1051 | I0 1052 | g45 1053 | I0 1054 | I0 1055 | tp272 1056 | (g43 1057 | g43 1058 | I0 1059 | I0 1060 | g49 1061 | g43 1062 | g43 1063 | g43 1064 | tp273 1065 | (g48 1066 | I0 1067 | g49 1068 | S'Qw' 1069 | p274 1070 | g51 1071 | I0 1072 | I0 1073 | g48 1074 | tp275 1075 | tp276 1076 | I0 1077 | ((I01 1078 | I01 1079 | tp277 1080 | (I00 1081 | I00 1082 | tp278 1083 | tp279 1084 | tp280 1085 | (lp281 1086 | (lp282 1087 | (I4 1088 | I7 1089 | tp283 1090 | a(I6 1091 | I7 1092 | tp284 1093 | aas(((g4 1094 | g5 1095 | g6 1096 | S'Qb' 1097 | p285 1098 | g8 1099 | g6 1100 | g5 1101 | g4 1102 | tp286 1103 | (g10 1104 | g10 1105 | g10 1106 | I0 1107 | g10 1108 | g10 1109 | g10 1110 | g10 1111 | tp287 1112 | (I0 1113 | I0 1114 | I0 1115 | I0 1116 | I0 1117 | I0 1118 | I0 1119 | I0 1120 | tp288 1121 | (I0 1122 | I0 1123 | I0 1124 | g10 1125 | I0 1126 | I0 1127 | I0 1128 | I0 1129 | tp289 1130 | (I0 1131 | I0 1132 | g14 1133 | g14 1134 | I0 1135 | I0 1136 | I0 1137 | I0 1138 | tp290 1139 | (I0 1140 | I0 1141 | I0 1142 | I0 1143 | I0 1144 | I0 1145 | I0 1146 | I0 1147 | tp291 1148 | (g14 1149 | g14 1150 | I0 1151 | I0 1152 | g14 1153 | g14 1154 | g14 1155 | g14 1156 | tp292 1157 | (g19 1158 | g16 1159 | g20 1160 | S'Qw' 1161 | p293 1162 | g22 1163 | g20 1164 | g16 1165 | g19 1166 | tp294 1167 | tp295 1168 | I1 1169 | ((I01 1170 | I01 1171 | tp296 1172 | (I01 1173 | I01 1174 | tp297 1175 | tp298 1176 | tp299 1177 | (lp300 1178 | (lp301 1179 | (I4 1180 | I1 1181 | tp302 1182 | a(I4 1183 | I2 1184 | tp303 1185 | aas(((g33 1186 | g34 1187 | g35 1188 | S'Qb' 1189 | p304 1190 | g37 1191 | g35 1192 | I0 1193 | g33 1194 | tp305 1195 | (g39 1196 | g39 1197 | g39 1198 | g39 1199 | g39 1200 | g39 1201 | I0 1202 | g39 1203 | tp306 1204 | (I0 1205 | I0 1206 | I0 1207 | I0 1208 | I0 1209 | g34 1210 | g39 1211 | I0 1212 | tp307 1213 | (I0 1214 | I0 1215 | I0 1216 | I0 1217 | I0 1218 | I0 1219 | I0 1220 | I0 1221 | tp308 1222 | (I0 1223 | I0 1224 | g43 1225 | g43 1226 | I0 1227 | I0 1228 | I0 1229 | I0 1230 | tp309 1231 | (I0 1232 | I0 1233 | I0 1234 | I0 1235 | I0 1236 | I0 1237 | I0 1238 | I0 1239 | tp310 1240 | (g43 1241 | g43 1242 | I0 1243 | I0 1244 | g43 1245 | g43 1246 | g43 1247 | g43 1248 | tp311 1249 | (g48 1250 | g45 1251 | g49 1252 | S'Qw' 1253 | p312 1254 | g51 1255 | g49 1256 | g45 1257 | g48 1258 | tp313 1259 | tp314 1260 | I0 1261 | ((I01 1262 | I01 1263 | tp315 1264 | (I01 1265 | I01 1266 | tp316 1267 | tp317 1268 | tp318 1269 | (lp319 1270 | (lp320 1271 | (I1 1272 | I7 1273 | tp321 1274 | a(I2 1275 | I5 1276 | tp322 1277 | aas(((g62 1278 | g63 1279 | g64 1280 | S'Qb' 1281 | p323 1282 | g66 1283 | g64 1284 | g63 1285 | g62 1286 | tp324 1287 | (g68 1288 | g68 1289 | g68 1290 | g68 1291 | g68 1292 | g68 1293 | g68 1294 | g68 1295 | tp325 1296 | (I0 1297 | I0 1298 | I0 1299 | I0 1300 | I0 1301 | I0 1302 | I0 1303 | I0 1304 | tp326 1305 | (I0 1306 | I0 1307 | I0 1308 | I0 1309 | I0 1310 | I0 1311 | I0 1312 | I0 1313 | tp327 1314 | (I0 1315 | I0 1316 | I0 1317 | I0 1318 | g73 1319 | I0 1320 | I0 1321 | I0 1322 | tp328 1323 | (I0 1324 | I0 1325 | I0 1326 | I0 1327 | I0 1328 | I0 1329 | I0 1330 | I0 1331 | tp329 1332 | (g73 1333 | g73 1334 | g73 1335 | g73 1336 | I0 1337 | g73 1338 | g73 1339 | g73 1340 | tp330 1341 | (g77 1342 | g72 1343 | g78 1344 | S'Qw' 1345 | p331 1346 | g80 1347 | g78 1348 | g72 1349 | g77 1350 | tp332 1351 | tp333 1352 | I1 1353 | ((I01 1354 | I01 1355 | tp334 1356 | (I01 1357 | I01 1358 | tp335 1359 | tp336 1360 | tp337 1361 | (lp338 1362 | (lp339 1363 | (I2 1364 | I1 1365 | tp340 1366 | a(I2 1367 | I3 1368 | tp341 1369 | aa(lp342 1370 | (I4 1371 | I1 1372 | tp343 1373 | a(I4 1374 | I3 1375 | tp344 1376 | aa(lp345 1377 | (I4 1378 | I1 1379 | tp346 1380 | a(I4 1381 | I2 1382 | tp347 1383 | aas(((S'Rb' 1384 | p348 1385 | I0 1386 | S'Bb' 1387 | p349 1388 | S'Qb' 1389 | p350 1390 | S'Kb' 1391 | p351 1392 | g349 1393 | S'Nb' 1394 | p352 1395 | g348 1396 | tp353 1397 | (I0 1398 | S'Pb' 1399 | p354 1400 | g354 1401 | g354 1402 | I0 1403 | g354 1404 | g354 1405 | g354 1406 | tp355 1407 | (g354 1408 | I0 1409 | g352 1410 | I0 1411 | I0 1412 | I0 1413 | I0 1414 | I0 1415 | tp356 1416 | (I0 1417 | S'Bw' 1418 | p357 1419 | I0 1420 | I0 1421 | g354 1422 | I0 1423 | I0 1424 | I0 1425 | tp358 1426 | (I0 1427 | I0 1428 | I0 1429 | I0 1430 | S'Pw' 1431 | p359 1432 | I0 1433 | I0 1434 | I0 1435 | tp360 1436 | (I0 1437 | I0 1438 | I0 1439 | I0 1440 | I0 1441 | S'Nw' 1442 | p361 1443 | I0 1444 | I0 1445 | tp362 1446 | (g359 1447 | g359 1448 | g359 1449 | g359 1450 | I0 1451 | g359 1452 | g359 1453 | g359 1454 | tp363 1455 | (S'Rw' 1456 | p364 1457 | g361 1458 | g357 1459 | S'Qw' 1460 | p365 1461 | S'Kw' 1462 | p366 1463 | I0 1464 | I0 1465 | g364 1466 | tp367 1467 | tp368 1468 | I0 1469 | ((I01 1470 | I01 1471 | tp369 1472 | (I01 1473 | I01 1474 | tp370 1475 | tp371 1476 | tp372 1477 | (lp373 1478 | (lp374 1479 | (I1 1480 | I3 1481 | tp375 1482 | a(I0 1483 | I4 1484 | tp376 1485 | aas(((g110 1486 | g111 1487 | g112 1488 | S'Qb' 1489 | p377 1490 | g115 1491 | I0 1492 | I0 1493 | g110 1494 | tp378 1495 | (g117 1496 | g117 1497 | g117 1498 | g117 1499 | I0 1500 | g117 1501 | g117 1502 | g117 1503 | tp379 1504 | (I0 1505 | I0 1506 | I0 1507 | I0 1508 | g117 1509 | g111 1510 | I0 1511 | I0 1512 | tp380 1513 | (I0 1514 | I0 1515 | I0 1516 | I0 1517 | I0 1518 | I0 1519 | I0 1520 | I0 1521 | tp381 1522 | (I0 1523 | g112 1524 | g121 1525 | g121 1526 | I0 1527 | I0 1528 | I0 1529 | I0 1530 | tp382 1531 | (I0 1532 | I0 1533 | g123 1534 | I0 1535 | g121 1536 | I0 1537 | I0 1538 | I0 1539 | tp383 1540 | (g121 1541 | g121 1542 | I0 1543 | I0 1544 | I0 1545 | g121 1546 | g121 1547 | g121 1548 | tp384 1549 | (g127 1550 | I0 1551 | g124 1552 | S'Qw' 1553 | p385 1554 | g129 1555 | g124 1556 | g123 1557 | g127 1558 | tp386 1559 | tp387 1560 | I1 1561 | ((I01 1562 | I01 1563 | tp388 1564 | (I01 1565 | I01 1566 | tp389 1567 | tp390 1568 | tp391 1569 | (lp392 1570 | (lp393 1571 | (I4 1572 | I0 1573 | tp394 1574 | a(I6 1575 | I0 1576 | tp395 1577 | aas(((g348 1578 | g352 1579 | g349 1580 | S'Qb' 1581 | p396 1582 | g351 1583 | g349 1584 | g352 1585 | g348 1586 | tp397 1587 | (g354 1588 | g354 1589 | g354 1590 | g354 1591 | I0 1592 | g354 1593 | g354 1594 | g354 1595 | tp398 1596 | (I0 1597 | I0 1598 | I0 1599 | I0 1600 | I0 1601 | I0 1602 | I0 1603 | I0 1604 | tp399 1605 | (I0 1606 | I0 1607 | I0 1608 | I0 1609 | g354 1610 | I0 1611 | I0 1612 | I0 1613 | tp400 1614 | (I0 1615 | I0 1616 | I0 1617 | I0 1618 | g359 1619 | I0 1620 | I0 1621 | I0 1622 | tp401 1623 | (I0 1624 | I0 1625 | I0 1626 | I0 1627 | I0 1628 | I0 1629 | I0 1630 | I0 1631 | tp402 1632 | (g359 1633 | g359 1634 | g359 1635 | g359 1636 | I0 1637 | g359 1638 | g359 1639 | g359 1640 | tp403 1641 | (g364 1642 | g361 1643 | g357 1644 | S'Qw' 1645 | p404 1646 | g366 1647 | g357 1648 | g361 1649 | g364 1650 | tp405 1651 | tp406 1652 | I0 1653 | ((I01 1654 | I01 1655 | tp407 1656 | (I01 1657 | I01 1658 | tp408 1659 | tp409 1660 | tp410 1661 | (lp411 1662 | (lp412 1663 | (I6 1664 | I7 1665 | tp413 1666 | a(I5 1667 | I5 1668 | tp414 1669 | aas(((S'Rb' 1670 | p415 1671 | S'Nb' 1672 | p416 1673 | S'Bb' 1674 | p417 1675 | S'Qb' 1676 | p418 1677 | S'Kb' 1678 | p419 1679 | g417 1680 | I0 1681 | g415 1682 | tp420 1683 | (S'Pb' 1684 | p421 1685 | g421 1686 | g421 1687 | I0 1688 | I0 1689 | g421 1690 | g421 1691 | g421 1692 | tp422 1693 | (I0 1694 | I0 1695 | I0 1696 | I0 1697 | g421 1698 | g416 1699 | I0 1700 | I0 1701 | tp423 1702 | (I0 1703 | I0 1704 | I0 1705 | g421 1706 | S'Pw' 1707 | p424 1708 | I0 1709 | I0 1710 | I0 1711 | tp425 1712 | (I0 1713 | I0 1714 | I0 1715 | g424 1716 | I0 1717 | I0 1718 | I0 1719 | I0 1720 | tp426 1721 | (I0 1722 | I0 1723 | I0 1724 | I0 1725 | I0 1726 | I0 1727 | I0 1728 | I0 1729 | tp427 1730 | (g424 1731 | g424 1732 | g424 1733 | S'Nw' 1734 | p428 1735 | I0 1736 | g424 1737 | g424 1738 | g424 1739 | tp429 1740 | (S'Rw' 1741 | p430 1742 | I0 1743 | S'Bw' 1744 | p431 1745 | S'Qw' 1746 | p432 1747 | S'Kw' 1748 | p433 1749 | g431 1750 | g428 1751 | g430 1752 | tp434 1753 | tp435 1754 | I1 1755 | ((I01 1756 | I01 1757 | tp436 1758 | (I01 1759 | I01 1760 | tp437 1761 | tp438 1762 | tp439 1763 | (lp440 1764 | (lp441 1765 | (I5 1766 | I2 1767 | tp442 1768 | a(I3 1769 | I1 1770 | tp443 1771 | aas(((g348 1772 | I0 1773 | g349 1774 | S'Qb' 1775 | p444 1776 | g351 1777 | g349 1778 | g352 1779 | g348 1780 | tp445 1781 | (g354 1782 | g354 1783 | g354 1784 | g354 1785 | I0 1786 | g354 1787 | g354 1788 | g354 1789 | tp446 1790 | (I0 1791 | I0 1792 | g352 1793 | I0 1794 | I0 1795 | I0 1796 | I0 1797 | I0 1798 | tp447 1799 | (I0 1800 | g357 1801 | I0 1802 | I0 1803 | g354 1804 | I0 1805 | I0 1806 | I0 1807 | tp448 1808 | (I0 1809 | I0 1810 | I0 1811 | I0 1812 | g359 1813 | I0 1814 | I0 1815 | I0 1816 | tp449 1817 | (I0 1818 | I0 1819 | I0 1820 | I0 1821 | I0 1822 | g361 1823 | I0 1824 | I0 1825 | tp450 1826 | (g359 1827 | g359 1828 | g359 1829 | g359 1830 | I0 1831 | g359 1832 | g359 1833 | g359 1834 | tp451 1835 | (g364 1836 | g361 1837 | g357 1838 | S'Qw' 1839 | p452 1840 | g366 1841 | I0 1842 | I0 1843 | g364 1844 | tp453 1845 | tp454 1846 | I1 1847 | ((I01 1848 | I01 1849 | tp455 1850 | (I01 1851 | I01 1852 | tp456 1853 | tp457 1854 | tp458 1855 | (lp459 1856 | (lp460 1857 | (I0 1858 | I1 1859 | tp461 1860 | a(I0 1861 | I2 1862 | tp462 1863 | aas(((g348 1864 | g352 1865 | g349 1866 | S'Qb' 1867 | p463 1868 | g351 1869 | g349 1870 | g352 1871 | g348 1872 | tp464 1873 | (g354 1874 | g354 1875 | g354 1876 | g354 1877 | I0 1878 | g354 1879 | g354 1880 | g354 1881 | tp465 1882 | (I0 1883 | I0 1884 | I0 1885 | I0 1886 | I0 1887 | I0 1888 | I0 1889 | I0 1890 | tp466 1891 | (I0 1892 | I0 1893 | I0 1894 | I0 1895 | g354 1896 | I0 1897 | I0 1898 | I0 1899 | tp467 1900 | (I0 1901 | I0 1902 | I0 1903 | I0 1904 | g359 1905 | I0 1906 | I0 1907 | I0 1908 | tp468 1909 | (I0 1910 | I0 1911 | I0 1912 | I0 1913 | I0 1914 | g361 1915 | I0 1916 | I0 1917 | tp469 1918 | (g359 1919 | g359 1920 | g359 1921 | g359 1922 | I0 1923 | g359 1924 | g359 1925 | g359 1926 | tp470 1927 | (g364 1928 | g361 1929 | g357 1930 | S'Qw' 1931 | p471 1932 | g366 1933 | g357 1934 | I0 1935 | g364 1936 | tp472 1937 | tp473 1938 | I1 1939 | ((I01 1940 | I01 1941 | tp474 1942 | (I01 1943 | I01 1944 | tp475 1945 | tp476 1946 | tp477 1947 | (lp478 1948 | (lp479 1949 | (I1 1950 | I0 1951 | tp480 1952 | a(I2 1953 | I2 1954 | tp481 1955 | aa(lp482 1956 | (I3 1957 | I1 1958 | tp483 1959 | a(I3 1960 | I2 1961 | tp484 1962 | aas(((g415 1963 | g416 1964 | g417 1965 | S'Qb' 1966 | p485 1967 | g419 1968 | g417 1969 | I0 1970 | g415 1971 | tp486 1972 | (g421 1973 | g421 1974 | I0 1975 | g416 1976 | I0 1977 | g421 1978 | g421 1979 | g421 1980 | tp487 1981 | (I0 1982 | I0 1983 | I0 1984 | I0 1985 | g421 1986 | I0 1987 | I0 1988 | I0 1989 | tp488 1990 | (I0 1991 | I0 1992 | g421 1993 | g421 1994 | g424 1995 | I0 1996 | I0 1997 | I0 1998 | tp489 1999 | (I0 2000 | I0 2001 | I0 2002 | g424 2003 | I0 2004 | I0 2005 | I0 2006 | I0 2007 | tp490 2008 | (I0 2009 | I0 2010 | I0 2011 | g431 2012 | I0 2013 | I0 2014 | I0 2015 | I0 2016 | tp491 2017 | (g424 2018 | g424 2019 | g424 2020 | g428 2021 | I0 2022 | g424 2023 | g424 2024 | g424 2025 | tp492 2026 | (g430 2027 | I0 2028 | g431 2029 | S'Qw' 2030 | p493 2031 | g433 2032 | I0 2033 | g428 2034 | g430 2035 | tp494 2036 | tp495 2037 | I0 2038 | ((I01 2039 | I01 2040 | tp496 2041 | (I01 2042 | I01 2043 | tp497 2044 | tp498 2045 | tp499 2046 | (lp500 2047 | (lp501 2048 | (I2 2049 | I6 2050 | tp502 2051 | a(I2 2052 | I5 2053 | tp503 2054 | aas(((S'Rb' 2055 | p504 2056 | I0 2057 | S'Bb' 2058 | p505 2059 | S'Qb' 2060 | p506 2061 | S'Kb' 2062 | p507 2063 | g505 2064 | S'Nb' 2065 | p508 2066 | g504 2067 | tp509 2068 | (S'Pb' 2069 | p510 2070 | g510 2071 | I0 2072 | g510 2073 | g510 2074 | g510 2075 | g510 2076 | g510 2077 | tp511 2078 | (I0 2079 | I0 2080 | g508 2081 | I0 2082 | I0 2083 | I0 2084 | I0 2085 | I0 2086 | tp512 2087 | (I0 2088 | I0 2089 | I0 2090 | I0 2091 | I0 2092 | I0 2093 | I0 2094 | I0 2095 | tp513 2096 | (I0 2097 | I0 2098 | I0 2099 | S'Nw' 2100 | p514 2101 | S'Pw' 2102 | p515 2103 | I0 2104 | I0 2105 | I0 2106 | tp516 2107 | (I0 2108 | I0 2109 | I0 2110 | I0 2111 | I0 2112 | I0 2113 | I0 2114 | I0 2115 | tp517 2116 | (g515 2117 | g515 2118 | g515 2119 | I0 2120 | I0 2121 | g515 2122 | g515 2123 | g515 2124 | tp518 2125 | (S'Rw' 2126 | p519 2127 | g514 2128 | S'Bw' 2129 | p520 2130 | S'Qw' 2131 | p521 2132 | S'Kw' 2133 | p522 2134 | g520 2135 | I0 2136 | g519 2137 | tp523 2138 | tp524 2139 | I1 2140 | ((I01 2141 | I01 2142 | tp525 2143 | (I01 2144 | I01 2145 | tp526 2146 | tp527 2147 | tp528 2148 | (lp529 2149 | (lp530 2150 | (I6 2151 | I0 2152 | tp531 2153 | a(I5 2154 | I2 2155 | tp532 2156 | aas(((g110 2157 | g111 2158 | g112 2159 | S'Qb' 2160 | p533 2161 | I0 2162 | g114 2163 | g115 2164 | I0 2165 | tp534 2166 | (g117 2167 | g117 2168 | g117 2169 | g117 2170 | I0 2171 | g117 2172 | g117 2173 | g117 2174 | tp535 2175 | (I0 2176 | I0 2177 | I0 2178 | I0 2179 | g117 2180 | g111 2181 | I0 2182 | I0 2183 | tp536 2184 | (I0 2185 | I0 2186 | I0 2187 | I0 2188 | I0 2189 | I0 2190 | I0 2191 | I0 2192 | tp537 2193 | (I0 2194 | g112 2195 | g121 2196 | g121 2197 | I0 2198 | I0 2199 | I0 2200 | I0 2201 | tp538 2202 | (I0 2203 | I0 2204 | g123 2205 | I0 2206 | g121 2207 | I0 2208 | I0 2209 | I0 2210 | tp539 2211 | (g121 2212 | g121 2213 | I0 2214 | I0 2215 | I0 2216 | g121 2217 | g121 2218 | g121 2219 | tp540 2220 | (g127 2221 | I0 2222 | g124 2223 | S'Qw' 2224 | p541 2225 | g129 2226 | g124 2227 | g123 2228 | g127 2229 | tp542 2230 | tp543 2231 | I0 2232 | ((I01 2233 | I01 2234 | tp544 2235 | (I00 2236 | I00 2237 | tp545 2238 | tp546 2239 | tp547 2240 | (lp548 2241 | (lp549 2242 | (I5 2243 | I7 2244 | tp550 2245 | a(I3 2246 | I5 2247 | tp551 2248 | aas(((g140 2249 | g141 2250 | g142 2251 | S'Qb' 2252 | p552 2253 | g144 2254 | I0 2255 | g141 2256 | g140 2257 | tp553 2258 | (g146 2259 | g146 2260 | g146 2261 | I0 2262 | I0 2263 | g146 2264 | g146 2265 | g146 2266 | tp554 2267 | (I0 2268 | I0 2269 | I0 2270 | I0 2271 | g146 2272 | I0 2273 | I0 2274 | I0 2275 | tp555 2276 | (I0 2277 | I0 2278 | I0 2279 | g146 2280 | g150 2281 | I0 2282 | I0 2283 | I0 2284 | tp556 2285 | (I0 2286 | g142 2287 | I0 2288 | g150 2289 | I0 2290 | I0 2291 | I0 2292 | I0 2293 | tp557 2294 | (I0 2295 | I0 2296 | g152 2297 | I0 2298 | I0 2299 | I0 2300 | I0 2301 | I0 2302 | tp558 2303 | (g150 2304 | g150 2305 | g150 2306 | I0 2307 | I0 2308 | g150 2309 | g150 2310 | g150 2311 | tp559 2312 | (g155 2313 | I0 2314 | g156 2315 | S'Qw' 2316 | p560 2317 | g158 2318 | g156 2319 | g152 2320 | g155 2321 | tp561 2322 | tp562 2323 | I1 2324 | ((I01 2325 | I01 2326 | tp563 2327 | (I01 2328 | I01 2329 | tp564 2330 | tp565 2331 | tp566 2332 | (lp567 2333 | (lp568 2334 | (I2 2335 | I1 2336 | tp569 2337 | a(I2 2338 | I3 2339 | tp570 2340 | aas(((g169 2341 | g170 2342 | g171 2343 | S'Qb' 2344 | p571 2345 | g173 2346 | g171 2347 | g170 2348 | g169 2349 | tp572 2350 | (g175 2351 | g175 2352 | g175 2353 | I0 2354 | I0 2355 | g175 2356 | g175 2357 | g175 2358 | tp573 2359 | (I0 2360 | I0 2361 | I0 2362 | g175 2363 | I0 2364 | I0 2365 | I0 2366 | I0 2367 | tp574 2368 | (I0 2369 | I0 2370 | I0 2371 | I0 2372 | g175 2373 | I0 2374 | I0 2375 | I0 2376 | tp575 2377 | (I0 2378 | I0 2379 | I0 2380 | I0 2381 | g179 2382 | I0 2383 | I0 2384 | I0 2385 | tp576 2386 | (I0 2387 | I0 2388 | I0 2389 | I0 2390 | I0 2391 | g181 2392 | I0 2393 | I0 2394 | tp577 2395 | (g179 2396 | g179 2397 | g179 2398 | g179 2399 | I0 2400 | g179 2401 | g179 2402 | g179 2403 | tp578 2404 | (g184 2405 | g181 2406 | g185 2407 | S'Qw' 2408 | p579 2409 | g187 2410 | g185 2411 | I0 2412 | g184 2413 | tp580 2414 | tp581 2415 | I0 2416 | ((I01 2417 | I01 2418 | tp582 2419 | (I01 2420 | I01 2421 | tp583 2422 | tp584 2423 | tp585 2424 | (lp586 2425 | (lp587 2426 | (I3 2427 | I6 2428 | tp588 2429 | a(I3 2430 | I4 2431 | tp589 2432 | aas(((g415 2433 | I0 2434 | g417 2435 | S'Qb' 2436 | p590 2437 | g419 2438 | g417 2439 | I0 2440 | g415 2441 | tp591 2442 | (g421 2443 | g421 2444 | I0 2445 | g416 2446 | I0 2447 | g421 2448 | g421 2449 | g421 2450 | tp592 2451 | (I0 2452 | I0 2453 | g416 2454 | I0 2455 | g421 2456 | I0 2457 | I0 2458 | I0 2459 | tp593 2460 | (I0 2461 | I0 2462 | g421 2463 | g421 2464 | g424 2465 | I0 2466 | I0 2467 | I0 2468 | tp594 2469 | (I0 2470 | I0 2471 | I0 2472 | g424 2473 | I0 2474 | I0 2475 | I0 2476 | I0 2477 | tp595 2478 | (I0 2479 | I0 2480 | g424 2481 | g431 2482 | I0 2483 | I0 2484 | I0 2485 | I0 2486 | tp596 2487 | (g424 2488 | g424 2489 | I0 2490 | g428 2491 | I0 2492 | g424 2493 | g424 2494 | g424 2495 | tp597 2496 | (g430 2497 | I0 2498 | g431 2499 | S'Qw' 2500 | p598 2501 | g433 2502 | I0 2503 | g428 2504 | g430 2505 | tp599 2506 | tp600 2507 | I0 2508 | ((I01 2509 | I01 2510 | tp601 2511 | (I01 2512 | I01 2513 | tp602 2514 | tp603 2515 | tp604 2516 | (lp605 2517 | (lp606 2518 | (I6 2519 | I7 2520 | tp607 2521 | a(I4 2522 | I6 2523 | tp608 2524 | aas(((g348 2525 | I0 2526 | g349 2527 | S'Qb' 2528 | p609 2529 | g351 2530 | g349 2531 | I0 2532 | g348 2533 | tp610 2534 | (I0 2535 | g354 2536 | g354 2537 | g354 2538 | I0 2539 | g354 2540 | g354 2541 | g354 2542 | tp611 2543 | (g354 2544 | I0 2545 | g352 2546 | I0 2547 | I0 2548 | g352 2549 | I0 2550 | I0 2551 | tp612 2552 | (I0 2553 | I0 2554 | I0 2555 | I0 2556 | g354 2557 | I0 2558 | I0 2559 | I0 2560 | tp613 2561 | (g357 2562 | I0 2563 | I0 2564 | I0 2565 | g359 2566 | I0 2567 | I0 2568 | I0 2569 | tp614 2570 | (I0 2571 | I0 2572 | I0 2573 | I0 2574 | I0 2575 | g361 2576 | I0 2577 | I0 2578 | tp615 2579 | (g359 2580 | g359 2581 | g359 2582 | g359 2583 | I0 2584 | g359 2585 | g359 2586 | g359 2587 | tp616 2588 | (g364 2589 | g361 2590 | g357 2591 | S'Qw' 2592 | p617 2593 | I0 2594 | S'Rw' 2595 | p618 2596 | g366 2597 | I0 2598 | tp619 2599 | tp620 2600 | I1 2601 | ((I00 2602 | I00 2603 | tp621 2604 | (I01 2605 | I01 2606 | tp622 2607 | tp623 2608 | tp624 2609 | (lp625 2610 | (lp626 2611 | (I5 2612 | I0 2613 | tp627 2614 | a(I4 2615 | I1 2616 | tp628 2617 | aas(((g415 2618 | g416 2619 | g417 2620 | S'Qb' 2621 | p629 2622 | g419 2623 | g417 2624 | I0 2625 | g415 2626 | tp630 2627 | (g421 2628 | g421 2629 | g421 2630 | I0 2631 | I0 2632 | g421 2633 | g421 2634 | g421 2635 | tp631 2636 | (I0 2637 | I0 2638 | I0 2639 | I0 2640 | g421 2641 | g416 2642 | I0 2643 | I0 2644 | tp632 2645 | (I0 2646 | I0 2647 | I0 2648 | g421 2649 | I0 2650 | I0 2651 | I0 2652 | I0 2653 | tp633 2654 | (I0 2655 | I0 2656 | I0 2657 | g424 2658 | g424 2659 | I0 2660 | I0 2661 | I0 2662 | tp634 2663 | (I0 2664 | I0 2665 | I0 2666 | I0 2667 | I0 2668 | I0 2669 | I0 2670 | I0 2671 | tp635 2672 | (g424 2673 | g424 2674 | g424 2675 | g428 2676 | I0 2677 | g424 2678 | g424 2679 | g424 2680 | tp636 2681 | (g430 2682 | I0 2683 | g431 2684 | S'Qw' 2685 | p637 2686 | g433 2687 | g431 2688 | g428 2689 | g430 2690 | tp638 2691 | tp639 2692 | I0 2693 | ((I01 2694 | I01 2695 | tp640 2696 | (I01 2697 | I01 2698 | tp641 2699 | tp642 2700 | tp643 2701 | (lp644 2702 | (lp645 2703 | (I4 2704 | I4 2705 | tp646 2706 | a(I4 2707 | I3 2708 | tp647 2709 | aas(((g33 2710 | g34 2711 | g35 2712 | S'Qb' 2713 | p648 2714 | g37 2715 | I0 2716 | I0 2717 | g33 2718 | tp649 2719 | (g39 2720 | g39 2721 | g39 2722 | I0 2723 | g39 2724 | g39 2725 | g35 2726 | g39 2727 | tp650 2728 | (I0 2729 | I0 2730 | I0 2731 | g39 2732 | I0 2733 | g34 2734 | g39 2735 | I0 2736 | tp651 2737 | (I0 2738 | I0 2739 | I0 2740 | I0 2741 | I0 2742 | I0 2743 | I0 2744 | I0 2745 | tp652 2746 | (I0 2747 | I0 2748 | g43 2749 | g43 2750 | g43 2751 | I0 2752 | I0 2753 | I0 2754 | tp653 2755 | (I0 2756 | I0 2757 | g45 2758 | I0 2759 | I0 2760 | I0 2761 | I0 2762 | I0 2763 | tp654 2764 | (g43 2765 | g43 2766 | I0 2767 | I0 2768 | I0 2769 | g43 2770 | g43 2771 | g43 2772 | tp655 2773 | (g48 2774 | I0 2775 | g49 2776 | S'Qw' 2777 | p656 2778 | g51 2779 | g49 2780 | g45 2781 | g48 2782 | tp657 2783 | tp658 2784 | I0 2785 | ((I01 2786 | I01 2787 | tp659 2788 | (I01 2789 | I01 2790 | tp660 2791 | tp661 2792 | tp662 2793 | (lp663 2794 | (lp664 2795 | (I6 2796 | I7 2797 | tp665 2798 | a(I5 2799 | I5 2800 | tp666 2801 | aas(((g4 2802 | g5 2803 | g6 2804 | S'Qb' 2805 | p667 2806 | g8 2807 | g6 2808 | I0 2809 | g4 2810 | tp668 2811 | (g10 2812 | g10 2813 | g10 2814 | I0 2815 | I0 2816 | g10 2817 | g10 2818 | g10 2819 | tp669 2820 | (I0 2821 | I0 2822 | I0 2823 | I0 2824 | g10 2825 | g5 2826 | I0 2827 | I0 2828 | tp670 2829 | (I0 2830 | I0 2831 | I0 2832 | g10 2833 | I0 2834 | I0 2835 | g20 2836 | I0 2837 | tp671 2838 | (I0 2839 | I0 2840 | g14 2841 | g14 2842 | I0 2843 | I0 2844 | I0 2845 | I0 2846 | tp672 2847 | (I0 2848 | I0 2849 | g16 2850 | I0 2851 | I0 2852 | I0 2853 | I0 2854 | I0 2855 | tp673 2856 | (g14 2857 | g14 2858 | I0 2859 | I0 2860 | g14 2861 | g14 2862 | g14 2863 | g14 2864 | tp674 2865 | (g19 2866 | I0 2867 | I0 2868 | S'Qw' 2869 | p675 2870 | g22 2871 | g20 2872 | g16 2873 | g19 2874 | tp676 2875 | tp677 2876 | I1 2877 | ((I01 2878 | I01 2879 | tp678 2880 | (I01 2881 | I01 2882 | tp679 2883 | tp680 2884 | tp681 2885 | (lp682 2886 | (lp683 2887 | (I5 2888 | I0 2889 | tp684 2890 | a(I4 2891 | I1 2892 | tp685 2893 | aas(((g33 2894 | g34 2895 | g35 2896 | S'Qb' 2897 | p686 2898 | g37 2899 | I0 2900 | I0 2901 | g33 2902 | tp687 2903 | (g39 2904 | g39 2905 | g39 2906 | I0 2907 | g39 2908 | g39 2909 | g35 2910 | g39 2911 | tp688 2912 | (I0 2913 | I0 2914 | I0 2915 | g39 2916 | I0 2917 | g34 2918 | g39 2919 | I0 2920 | tp689 2921 | (I0 2922 | I0 2923 | I0 2924 | I0 2925 | I0 2926 | I0 2927 | I0 2928 | I0 2929 | tp690 2930 | (I0 2931 | I0 2932 | g43 2933 | g43 2934 | g43 2935 | I0 2936 | I0 2937 | I0 2938 | tp691 2939 | (I0 2940 | I0 2941 | g45 2942 | I0 2943 | I0 2944 | g45 2945 | I0 2946 | I0 2947 | tp692 2948 | (g43 2949 | g43 2950 | I0 2951 | I0 2952 | I0 2953 | g43 2954 | g43 2955 | g43 2956 | tp693 2957 | (g48 2958 | I0 2959 | g49 2960 | S'Qw' 2961 | p694 2962 | g51 2963 | g49 2964 | I0 2965 | g48 2966 | tp695 2967 | tp696 2968 | I1 2969 | ((I01 2970 | I01 2971 | tp697 2972 | (I01 2973 | I01 2974 | tp698 2975 | tp699 2976 | tp700 2977 | (lp701 2978 | (lp702 2979 | (I4 2980 | I0 2981 | tp703 2982 | a(I6 2983 | I0 2984 | tp704 2985 | aas(((g4 2986 | g5 2987 | g6 2988 | S'Qb' 2989 | p705 2990 | g8 2991 | g6 2992 | g5 2993 | g4 2994 | tp706 2995 | (g10 2996 | g10 2997 | g10 2998 | I0 2999 | I0 3000 | g10 3001 | g10 3002 | g10 3003 | tp707 3004 | (I0 3005 | I0 3006 | I0 3007 | I0 3008 | g10 3009 | I0 3010 | I0 3011 | I0 3012 | tp708 3013 | (I0 3014 | I0 3015 | I0 3016 | g10 3017 | I0 3018 | I0 3019 | I0 3020 | I0 3021 | tp709 3022 | (I0 3023 | I0 3024 | g14 3025 | g14 3026 | I0 3027 | I0 3028 | I0 3029 | I0 3030 | tp710 3031 | (I0 3032 | I0 3033 | I0 3034 | I0 3035 | I0 3036 | I0 3037 | I0 3038 | I0 3039 | tp711 3040 | (g14 3041 | g14 3042 | I0 3043 | I0 3044 | g14 3045 | g14 3046 | g14 3047 | g14 3048 | tp712 3049 | (g19 3050 | g16 3051 | g20 3052 | S'Qw' 3053 | p713 3054 | g22 3055 | g20 3056 | g16 3057 | g19 3058 | tp714 3059 | tp715 3060 | I0 3061 | ((I01 3062 | I01 3063 | tp716 3064 | (I01 3065 | I01 3066 | tp717 3067 | tp718 3068 | tp719 3069 | (lp720 3070 | (lp721 3071 | (I1 3072 | I7 3073 | tp722 3074 | a(I2 3075 | I5 3076 | tp723 3077 | aas(((g504 3078 | I0 3079 | g505 3080 | S'Qb' 3081 | p724 3082 | g507 3083 | g505 3084 | I0 3085 | g504 3086 | tp725 3087 | (g510 3088 | g510 3089 | I0 3090 | g510 3091 | g510 3092 | g510 3093 | g510 3094 | g510 3095 | tp726 3096 | (I0 3097 | I0 3098 | g508 3099 | I0 3100 | I0 3101 | g508 3102 | I0 3103 | I0 3104 | tp727 3105 | (I0 3106 | I0 3107 | I0 3108 | I0 3109 | I0 3110 | I0 3111 | I0 3112 | I0 3113 | tp728 3114 | (I0 3115 | I0 3116 | I0 3117 | g514 3118 | g515 3119 | I0 3120 | I0 3121 | I0 3122 | tp729 3123 | (I0 3124 | I0 3125 | g514 3126 | I0 3127 | I0 3128 | I0 3129 | I0 3130 | I0 3131 | tp730 3132 | (g515 3133 | g515 3134 | g515 3135 | I0 3136 | I0 3137 | g515 3138 | g515 3139 | g515 3140 | tp731 3141 | (g519 3142 | I0 3143 | g520 3144 | S'Qw' 3145 | p732 3146 | g522 3147 | g520 3148 | I0 3149 | g519 3150 | tp733 3151 | tp734 3152 | I1 3153 | ((I01 3154 | I01 3155 | tp735 3156 | (I01 3157 | I01 3158 | tp736 3159 | tp737 3160 | tp738 3161 | (lp739 3162 | (lp740 3163 | (I4 3164 | I1 3165 | tp741 3166 | a(I4 3167 | I3 3168 | tp742 3169 | aas(((g348 3170 | I0 3171 | g349 3172 | S'Qb' 3173 | p743 3174 | g351 3175 | I0 3176 | I0 3177 | g348 3178 | tp744 3179 | (I0 3180 | g354 3181 | g354 3182 | g354 3183 | g349 3184 | g354 3185 | g354 3186 | g354 3187 | tp745 3188 | (g354 3189 | I0 3190 | g352 3191 | I0 3192 | I0 3193 | g352 3194 | I0 3195 | I0 3196 | tp746 3197 | (I0 3198 | I0 3199 | I0 3200 | I0 3201 | g354 3202 | I0 3203 | I0 3204 | I0 3205 | tp747 3206 | (g357 3207 | I0 3208 | I0 3209 | I0 3210 | g359 3211 | I0 3212 | I0 3213 | I0 3214 | tp748 3215 | (I0 3216 | I0 3217 | I0 3218 | I0 3219 | I0 3220 | g361 3221 | I0 3222 | I0 3223 | tp749 3224 | (g359 3225 | g359 3226 | g359 3227 | g359 3228 | I0 3229 | g359 3230 | g359 3231 | g359 3232 | tp750 3233 | (g364 3234 | g361 3235 | g357 3236 | S'Qw' 3237 | p751 3238 | g618 3239 | I0 3240 | g366 3241 | I0 3242 | tp752 3243 | tp753 3244 | I1 3245 | ((I00 3246 | I00 3247 | tp754 3248 | (I01 3249 | I01 3250 | tp755 3251 | tp756 3252 | tp757 3253 | (lp758 3254 | (lp759 3255 | (I1 3256 | I1 3257 | tp760 3258 | a(I1 3259 | I3 3260 | tp761 3261 | aas(((g348 3262 | I0 3263 | g349 3264 | S'Qb' 3265 | p762 3266 | g351 3267 | I0 3268 | I0 3269 | g348 3270 | tp763 3271 | (I0 3272 | g354 3273 | g354 3274 | g354 3275 | g349 3276 | g354 3277 | g354 3278 | g354 3279 | tp764 3280 | (g354 3281 | I0 3282 | g352 3283 | I0 3284 | I0 3285 | g352 3286 | I0 3287 | I0 3288 | tp765 3289 | (I0 3290 | I0 3291 | I0 3292 | I0 3293 | g354 3294 | I0 3295 | I0 3296 | I0 3297 | tp766 3298 | (g357 3299 | I0 3300 | I0 3301 | I0 3302 | g359 3303 | I0 3304 | I0 3305 | I0 3306 | tp767 3307 | (I0 3308 | I0 3309 | I0 3310 | I0 3311 | I0 3312 | g361 3313 | I0 3314 | I0 3315 | tp768 3316 | (g359 3317 | g359 3318 | g359 3319 | g359 3320 | I0 3321 | g359 3322 | g359 3323 | g359 3324 | tp769 3325 | (g364 3326 | g361 3327 | g357 3328 | S'Qw' 3329 | p770 3330 | I0 3331 | g618 3332 | g366 3333 | I0 3334 | tp771 3335 | tp772 3336 | I0 3337 | ((I00 3338 | I00 3339 | tp773 3340 | (I01 3341 | I01 3342 | tp774 3343 | tp775 3344 | tp776 3345 | (lp777 3346 | (lp778 3347 | (I5 3348 | I7 3349 | tp779 3350 | a(I4 3351 | I7 3352 | tp780 3353 | aas(((g140 3354 | g141 3355 | g142 3356 | S'Qb' 3357 | p781 3358 | g144 3359 | I0 3360 | g141 3361 | g140 3362 | tp782 3363 | (g146 3364 | g146 3365 | I0 3366 | I0 3367 | I0 3368 | g146 3369 | g146 3370 | g146 3371 | tp783 3372 | (I0 3373 | I0 3374 | I0 3375 | I0 3376 | g146 3377 | I0 3378 | I0 3379 | I0 3380 | tp784 3381 | (I0 3382 | I0 3383 | g146 3384 | g146 3385 | g150 3386 | I0 3387 | I0 3388 | I0 3389 | tp785 3390 | (I0 3391 | g142 3392 | I0 3393 | g150 3394 | I0 3395 | I0 3396 | I0 3397 | I0 3398 | tp786 3399 | (I0 3400 | I0 3401 | g152 3402 | I0 3403 | I0 3404 | I0 3405 | I0 3406 | I0 3407 | tp787 3408 | (g150 3409 | g150 3410 | g150 3411 | I0 3412 | I0 3413 | g150 3414 | g150 3415 | g150 3416 | tp788 3417 | (g155 3418 | I0 3419 | g156 3420 | S'Qw' 3421 | p789 3422 | g158 3423 | g156 3424 | g152 3425 | g155 3426 | tp790 3427 | tp791 3428 | I0 3429 | ((I01 3430 | I01 3431 | tp792 3432 | (I01 3433 | I01 3434 | tp793 3435 | tp794 3436 | tp795 3437 | (lp796 3438 | (lp797 3439 | (I0 3440 | I6 3441 | tp798 3442 | a(I0 3443 | I5 3444 | tp799 3445 | aas(((g140 3446 | g141 3447 | g142 3448 | S'Qb' 3449 | p800 3450 | g144 3451 | I0 3452 | g141 3453 | g140 3454 | tp801 3455 | (g146 3456 | g146 3457 | I0 3458 | I0 3459 | I0 3460 | g146 3461 | g146 3462 | g146 3463 | tp802 3464 | (I0 3465 | I0 3466 | I0 3467 | I0 3468 | g146 3469 | I0 3470 | I0 3471 | I0 3472 | tp803 3473 | (I0 3474 | I0 3475 | g146 3476 | g146 3477 | g150 3478 | I0 3479 | I0 3480 | I0 3481 | tp804 3482 | (I0 3483 | I0 3484 | I0 3485 | g150 3486 | I0 3487 | I0 3488 | I0 3489 | I0 3490 | tp805 3491 | (g150 3492 | I0 3493 | g142 3494 | I0 3495 | I0 3496 | I0 3497 | I0 3498 | I0 3499 | tp806 3500 | (I0 3501 | g150 3502 | g150 3503 | I0 3504 | I0 3505 | g150 3506 | g150 3507 | g150 3508 | tp807 3509 | (g155 3510 | I0 3511 | g156 3512 | S'Qw' 3513 | p808 3514 | g158 3515 | g156 3516 | g152 3517 | g155 3518 | tp809 3519 | tp810 3520 | I0 3521 | ((I01 3522 | I01 3523 | tp811 3524 | (I01 3525 | I01 3526 | tp812 3527 | tp813 3528 | tp814 3529 | (lp815 3530 | (lp816 3531 | (I1 3532 | I6 3533 | tp817 3534 | a(I2 3535 | I5 3536 | tp818 3537 | aas(((g62 3538 | g63 3539 | g64 3540 | S'Qb' 3541 | p819 3542 | g66 3543 | g64 3544 | g63 3545 | g62 3546 | tp820 3547 | (g68 3548 | g68 3549 | I0 3550 | I0 3551 | g68 3552 | g68 3553 | g68 3554 | g68 3555 | tp821 3556 | (I0 3557 | I0 3558 | I0 3559 | g68 3560 | I0 3561 | I0 3562 | I0 3563 | I0 3564 | tp822 3565 | (I0 3566 | I0 3567 | I0 3568 | I0 3569 | I0 3570 | I0 3571 | I0 3572 | I0 3573 | tp823 3574 | (I0 3575 | I0 3576 | I0 3577 | g68 3578 | g73 3579 | I0 3580 | I0 3581 | I0 3582 | tp824 3583 | (I0 3584 | I0 3585 | I0 3586 | I0 3587 | I0 3588 | g72 3589 | I0 3590 | I0 3591 | tp825 3592 | (g73 3593 | g73 3594 | g73 3595 | I0 3596 | I0 3597 | g73 3598 | g73 3599 | g73 3600 | tp826 3601 | (g77 3602 | g72 3603 | g78 3604 | S'Qw' 3605 | p827 3606 | g80 3607 | g78 3608 | I0 3609 | g77 3610 | tp828 3611 | tp829 3612 | I0 3613 | ((I01 3614 | I01 3615 | tp830 3616 | (I01 3617 | I01 3618 | tp831 3619 | tp832 3620 | tp833 3621 | (lp834 3622 | (lp835 3623 | (I5 3624 | I5 3625 | tp836 3626 | a(I3 3627 | I4 3628 | tp837 3629 | aas(((g415 3630 | g416 3631 | g417 3632 | S'Qb' 3633 | p838 3634 | g419 3635 | g417 3636 | I0 3637 | g415 3638 | tp839 3639 | (g421 3640 | g421 3641 | I0 3642 | g416 3643 | I0 3644 | g421 3645 | g421 3646 | g421 3647 | tp840 3648 | (I0 3649 | I0 3650 | I0 3651 | I0 3652 | g421 3653 | I0 3654 | I0 3655 | I0 3656 | tp841 3657 | (I0 3658 | I0 3659 | g421 3660 | g421 3661 | g424 3662 | I0 3663 | I0 3664 | I0 3665 | tp842 3666 | (I0 3667 | I0 3668 | I0 3669 | g424 3670 | I0 3671 | I0 3672 | I0 3673 | I0 3674 | tp843 3675 | (I0 3676 | I0 3677 | g424 3678 | g431 3679 | I0 3680 | I0 3681 | I0 3682 | I0 3683 | tp844 3684 | (g424 3685 | g424 3686 | I0 3687 | g428 3688 | I0 3689 | g424 3690 | g424 3691 | g424 3692 | tp845 3693 | (g430 3694 | I0 3695 | g431 3696 | S'Qw' 3697 | p846 3698 | g433 3699 | I0 3700 | g428 3701 | g430 3702 | tp847 3703 | tp848 3704 | I1 3705 | ((I01 3706 | I01 3707 | tp849 3708 | (I01 3709 | I01 3710 | tp850 3711 | tp851 3712 | tp852 3713 | (lp853 3714 | (lp854 3715 | (I1 3716 | I0 3717 | tp855 3718 | a(I2 3719 | I2 3720 | tp856 3721 | aas(((g110 3722 | g111 3723 | g112 3724 | S'Qb' 3725 | p857 3726 | g115 3727 | g112 3728 | I0 3729 | g110 3730 | tp858 3731 | (g117 3732 | g117 3733 | g117 3734 | g117 3735 | g117 3736 | g117 3737 | g117 3738 | g117 3739 | tp859 3740 | (I0 3741 | I0 3742 | I0 3743 | I0 3744 | I0 3745 | g111 3746 | I0 3747 | I0 3748 | tp860 3749 | (I0 3750 | I0 3751 | I0 3752 | I0 3753 | I0 3754 | I0 3755 | I0 3756 | I0 3757 | tp861 3758 | (I0 3759 | I0 3760 | g121 3761 | g121 3762 | I0 3763 | I0 3764 | I0 3765 | I0 3766 | tp862 3767 | (I0 3768 | I0 3769 | I0 3770 | I0 3771 | I0 3772 | I0 3773 | I0 3774 | I0 3775 | tp863 3776 | (g121 3777 | g121 3778 | I0 3779 | I0 3780 | g121 3781 | g121 3782 | g121 3783 | g121 3784 | tp864 3785 | (g127 3786 | g123 3787 | g124 3788 | S'Qw' 3789 | p865 3790 | g129 3791 | g124 3792 | g123 3793 | g127 3794 | tp866 3795 | tp867 3796 | I1 3797 | ((I01 3798 | I01 3799 | tp868 3800 | (I01 3801 | I01 3802 | tp869 3803 | tp870 3804 | tp871 3805 | (lp872 3806 | (lp873 3807 | (I4 3808 | I1 3809 | tp874 3810 | a(I4 3811 | I2 3812 | tp875 3813 | aa(lp876 3814 | (I6 3815 | I1 3816 | tp877 3817 | a(I6 3818 | I2 3819 | tp878 3820 | aas(((g140 3821 | g141 3822 | g142 3823 | S'Qb' 3824 | p879 3825 | g144 3826 | I0 3827 | g141 3828 | g140 3829 | tp880 3830 | (g146 3831 | g146 3832 | I0 3833 | I0 3834 | I0 3835 | g146 3836 | g146 3837 | g146 3838 | tp881 3839 | (I0 3840 | I0 3841 | I0 3842 | I0 3843 | g146 3844 | I0 3845 | I0 3846 | I0 3847 | tp882 3848 | (I0 3849 | I0 3850 | g146 3851 | g146 3852 | g150 3853 | I0 3854 | I0 3855 | I0 3856 | tp883 3857 | (I0 3858 | g142 3859 | I0 3860 | g150 3861 | I0 3862 | I0 3863 | I0 3864 | I0 3865 | tp884 3866 | (g150 3867 | I0 3868 | g152 3869 | I0 3870 | I0 3871 | I0 3872 | I0 3873 | I0 3874 | tp885 3875 | (I0 3876 | g150 3877 | g150 3878 | I0 3879 | I0 3880 | g150 3881 | g150 3882 | g150 3883 | tp886 3884 | (g155 3885 | I0 3886 | g156 3887 | S'Qw' 3888 | p887 3889 | g158 3890 | g156 3891 | g152 3892 | g155 3893 | tp888 3894 | tp889 3895 | I1 3896 | ((I01 3897 | I01 3898 | tp890 3899 | (I01 3900 | I01 3901 | tp891 3902 | tp892 3903 | tp893 3904 | (lp894 3905 | (lp895 3906 | (I1 3907 | I4 3908 | tp896 3909 | a(I2 3910 | I5 3911 | tp897 3912 | aas(((g348 3913 | I0 3914 | g349 3915 | S'Qb' 3916 | p898 3917 | g351 3918 | g349 3919 | I0 3920 | g348 3921 | tp899 3922 | (I0 3923 | g354 3924 | g354 3925 | g354 3926 | I0 3927 | g354 3928 | g354 3929 | g354 3930 | tp900 3931 | (g354 3932 | I0 3933 | g352 3934 | I0 3935 | I0 3936 | g352 3937 | I0 3938 | I0 3939 | tp901 3940 | (I0 3941 | I0 3942 | I0 3943 | I0 3944 | g354 3945 | I0 3946 | I0 3947 | I0 3948 | tp902 3949 | (g357 3950 | I0 3951 | I0 3952 | I0 3953 | g359 3954 | I0 3955 | I0 3956 | I0 3957 | tp903 3958 | (I0 3959 | I0 3960 | I0 3961 | I0 3962 | I0 3963 | g361 3964 | I0 3965 | I0 3966 | tp904 3967 | (g359 3968 | g359 3969 | g359 3970 | g359 3971 | I0 3972 | g359 3973 | g359 3974 | g359 3975 | tp905 3976 | (g364 3977 | g361 3978 | g357 3979 | S'Qw' 3980 | p906 3981 | g366 3982 | I0 3983 | I0 3984 | g364 3985 | tp907 3986 | tp908 3987 | I0 3988 | ((I01 3989 | I01 3990 | tp909 3991 | (I01 3992 | I01 3993 | tp910 3994 | tp911 3995 | tp912 3996 | (lp913 3997 | (lp914 3998 | (I4 3999 | I7 4000 | tp915 4001 | a(I6 4002 | I7 4003 | tp916 4004 | aas(((g62 4005 | g63 4006 | g64 4007 | S'Qb' 4008 | p917 4009 | g66 4010 | g64 4011 | g63 4012 | g62 4013 | tp918 4014 | (g68 4015 | g68 4016 | I0 4017 | g68 4018 | g68 4019 | g68 4020 | g68 4021 | g68 4022 | tp919 4023 | (I0 4024 | I0 4025 | I0 4026 | I0 4027 | I0 4028 | I0 4029 | I0 4030 | I0 4031 | tp920 4032 | (I0 4033 | I0 4034 | g68 4035 | I0 4036 | I0 4037 | I0 4038 | I0 4039 | I0 4040 | tp921 4041 | (I0 4042 | I0 4043 | I0 4044 | I0 4045 | g73 4046 | I0 4047 | I0 4048 | I0 4049 | tp922 4050 | (I0 4051 | I0 4052 | I0 4053 | I0 4054 | I0 4055 | g72 4056 | I0 4057 | I0 4058 | tp923 4059 | (g73 4060 | g73 4061 | g73 4062 | g73 4063 | I0 4064 | g73 4065 | g73 4066 | g73 4067 | tp924 4068 | (g77 4069 | g72 4070 | g78 4071 | S'Qw' 4072 | p925 4073 | g80 4074 | g78 4075 | I0 4076 | g77 4077 | tp926 4078 | tp927 4079 | I1 4080 | ((I01 4081 | I01 4082 | tp928 4083 | (I01 4084 | I01 4085 | tp929 4086 | tp930 4087 | tp931 4088 | (lp932 4089 | (lp933 4090 | (I3 4091 | I1 4092 | tp934 4093 | a(I3 4094 | I2 4095 | tp935 4096 | aa(lp936 4097 | (I1 4098 | I0 4099 | tp937 4100 | a(I2 4101 | I2 4102 | tp938 4103 | aas(((g415 4104 | g416 4105 | g417 4106 | S'Qb' 4107 | p939 4108 | g419 4109 | g417 4110 | I0 4111 | g415 4112 | tp940 4113 | (g421 4114 | g421 4115 | g421 4116 | g416 4117 | I0 4118 | g421 4119 | g421 4120 | g421 4121 | tp941 4122 | (I0 4123 | I0 4124 | I0 4125 | I0 4126 | g421 4127 | I0 4128 | I0 4129 | I0 4130 | tp942 4131 | (I0 4132 | I0 4133 | I0 4134 | g421 4135 | g424 4136 | I0 4137 | I0 4138 | I0 4139 | tp943 4140 | (I0 4141 | I0 4142 | I0 4143 | g424 4144 | I0 4145 | I0 4146 | I0 4147 | I0 4148 | tp944 4149 | (I0 4150 | I0 4151 | I0 4152 | g431 4153 | I0 4154 | I0 4155 | I0 4156 | I0 4157 | tp945 4158 | (g424 4159 | g424 4160 | g424 4161 | g428 4162 | I0 4163 | g424 4164 | g424 4165 | g424 4166 | tp946 4167 | (g430 4168 | I0 4169 | g431 4170 | S'Qw' 4171 | p947 4172 | g433 4173 | I0 4174 | g428 4175 | g430 4176 | tp948 4177 | tp949 4178 | I1 4179 | ((I01 4180 | I01 4181 | tp950 4182 | (I01 4183 | I01 4184 | tp951 4185 | tp952 4186 | tp953 4187 | (lp954 4188 | (lp955 4189 | (I2 4190 | I1 4191 | tp956 4192 | a(I2 4193 | I3 4194 | tp957 4195 | aas(((g140 4196 | g141 4197 | g142 4198 | S'Qb' 4199 | p958 4200 | g144 4201 | I0 4202 | g141 4203 | g140 4204 | tp959 4205 | (g146 4206 | g146 4207 | g146 4208 | I0 4209 | I0 4210 | g146 4211 | g146 4212 | g146 4213 | tp960 4214 | (I0 4215 | I0 4216 | I0 4217 | I0 4218 | g146 4219 | I0 4220 | I0 4221 | I0 4222 | tp961 4223 | (I0 4224 | I0 4225 | I0 4226 | g146 4227 | I0 4228 | I0 4229 | I0 4230 | I0 4231 | tp962 4232 | (I0 4233 | g142 4234 | I0 4235 | g150 4236 | g150 4237 | I0 4238 | I0 4239 | I0 4240 | tp963 4241 | (I0 4242 | I0 4243 | g152 4244 | I0 4245 | I0 4246 | I0 4247 | I0 4248 | I0 4249 | tp964 4250 | (g150 4251 | g150 4252 | g150 4253 | I0 4254 | I0 4255 | g150 4256 | g150 4257 | g150 4258 | tp965 4259 | (g155 4260 | I0 4261 | g156 4262 | S'Qw' 4263 | p966 4264 | g158 4265 | g156 4266 | g152 4267 | g155 4268 | tp967 4269 | tp968 4270 | I0 4271 | ((I01 4272 | I01 4273 | tp969 4274 | (I01 4275 | I01 4276 | tp970 4277 | tp971 4278 | tp972 4279 | (lp973 4280 | (lp974 4281 | (I4 4282 | I4 4283 | tp975 4284 | a(I4 4285 | I3 4286 | tp976 4287 | aas(((g62 4288 | g63 4289 | g64 4290 | S'Qb' 4291 | p977 4292 | g66 4293 | g64 4294 | I0 4295 | g62 4296 | tp978 4297 | (I0 4298 | g68 4299 | I0 4300 | I0 4301 | g68 4302 | g68 4303 | g68 4304 | g68 4305 | tp979 4306 | (g68 4307 | I0 4308 | I0 4309 | g68 4310 | I0 4311 | g63 4312 | I0 4313 | I0 4314 | tp980 4315 | (I0 4316 | I0 4317 | I0 4318 | I0 4319 | I0 4320 | I0 4321 | I0 4322 | I0 4323 | tp981 4324 | (I0 4325 | I0 4326 | I0 4327 | g72 4328 | g73 4329 | I0 4330 | I0 4331 | I0 4332 | tp982 4333 | (I0 4334 | I0 4335 | g72 4336 | I0 4337 | I0 4338 | I0 4339 | I0 4340 | I0 4341 | tp983 4342 | (g73 4343 | g73 4344 | g73 4345 | I0 4346 | I0 4347 | g73 4348 | g73 4349 | g73 4350 | tp984 4351 | (g77 4352 | I0 4353 | g78 4354 | S'Qw' 4355 | p985 4356 | g80 4357 | g78 4358 | I0 4359 | g77 4360 | tp986 4361 | tp987 4362 | I0 4363 | ((I01 4364 | I01 4365 | tp988 4366 | (I01 4367 | I01 4368 | tp989 4369 | tp990 4370 | tp991 4371 | (lp992 4372 | (lp993 4373 | (I5 4374 | I7 4375 | tp994 4376 | a(I4 4377 | I6 4378 | tp995 4379 | aa(lp996 4380 | (I2 4381 | I7 4382 | tp997 4383 | a(I6 4384 | I3 4385 | tp998 4386 | aa(lp999 4387 | (I2 4388 | I7 4389 | tp1000 4390 | a(I4 4391 | I5 4392 | tp1001 4393 | aas(((g62 4394 | g63 4395 | g64 4396 | S'Qb' 4397 | p1002 4398 | g66 4399 | g64 4400 | g63 4401 | g62 4402 | tp1003 4403 | (g68 4404 | g68 4405 | I0 4406 | I0 4407 | g68 4408 | g68 4409 | g68 4410 | g68 4411 | tp1004 4412 | (I0 4413 | I0 4414 | I0 4415 | g68 4416 | I0 4417 | I0 4418 | I0 4419 | I0 4420 | tp1005 4421 | (I0 4422 | I0 4423 | I0 4424 | I0 4425 | I0 4426 | I0 4427 | I0 4428 | I0 4429 | tp1006 4430 | (I0 4431 | I0 4432 | I0 4433 | g72 4434 | g73 4435 | I0 4436 | I0 4437 | I0 4438 | tp1007 4439 | (I0 4440 | I0 4441 | I0 4442 | I0 4443 | I0 4444 | I0 4445 | I0 4446 | I0 4447 | tp1008 4448 | (g73 4449 | g73 4450 | g73 4451 | I0 4452 | I0 4453 | g73 4454 | g73 4455 | g73 4456 | tp1009 4457 | (g77 4458 | g72 4459 | g78 4460 | S'Qw' 4461 | p1010 4462 | g80 4463 | g78 4464 | I0 4465 | g77 4466 | tp1011 4467 | tp1012 4468 | I1 4469 | ((I01 4470 | I01 4471 | tp1013 4472 | (I01 4473 | I01 4474 | tp1014 4475 | tp1015 4476 | tp1016 4477 | (lp1017 4478 | (lp1018 4479 | (I6 4480 | I0 4481 | tp1019 4482 | a(I5 4483 | I2 4484 | tp1020 4485 | aas(((g4 4486 | g5 4487 | g6 4488 | S'Qb' 4489 | p1021 4490 | g8 4491 | g6 4492 | I0 4493 | g4 4494 | tp1022 4495 | (g10 4496 | g10 4497 | g10 4498 | I0 4499 | I0 4500 | g10 4501 | g10 4502 | g10 4503 | tp1023 4504 | (I0 4505 | I0 4506 | I0 4507 | I0 4508 | g10 4509 | g5 4510 | I0 4511 | I0 4512 | tp1024 4513 | (I0 4514 | I0 4515 | I0 4516 | g10 4517 | I0 4518 | I0 4519 | I0 4520 | I0 4521 | tp1025 4522 | (I0 4523 | I0 4524 | g14 4525 | g14 4526 | I0 4527 | I0 4528 | I0 4529 | I0 4530 | tp1026 4531 | (I0 4532 | I0 4533 | g16 4534 | I0 4535 | I0 4536 | I0 4537 | I0 4538 | I0 4539 | tp1027 4540 | (g14 4541 | g14 4542 | I0 4543 | I0 4544 | g14 4545 | g14 4546 | g14 4547 | g14 4548 | tp1028 4549 | (g19 4550 | I0 4551 | g20 4552 | S'Qw' 4553 | p1029 4554 | g22 4555 | g20 4556 | g16 4557 | g19 4558 | tp1030 4559 | tp1031 4560 | I0 4561 | ((I01 4562 | I01 4563 | tp1032 4564 | (I01 4565 | I01 4566 | tp1033 4567 | tp1034 4568 | tp1035 4569 | (lp1036 4570 | (lp1037 4571 | (I2 4572 | I7 4573 | tp1038 4574 | a(I6 4575 | I3 4576 | tp1039 4577 | aas(((g4 4578 | g5 4579 | g6 4580 | S'Qb' 4581 | p1040 4582 | g8 4583 | I0 4584 | I0 4585 | g4 4586 | tp1041 4587 | (g10 4588 | g10 4589 | g10 4590 | I0 4591 | g6 4592 | g10 4593 | g10 4594 | g10 4595 | tp1042 4596 | (I0 4597 | I0 4598 | I0 4599 | I0 4600 | g10 4601 | g5 4602 | I0 4603 | I0 4604 | tp1043 4605 | (I0 4606 | I0 4607 | I0 4608 | g10 4609 | I0 4610 | I0 4611 | g20 4612 | I0 4613 | tp1044 4614 | (I0 4615 | I0 4616 | g14 4617 | g14 4618 | I0 4619 | I0 4620 | I0 4621 | I0 4622 | tp1045 4623 | (I0 4624 | I0 4625 | g16 4626 | I0 4627 | g14 4628 | I0 4629 | I0 4630 | I0 4631 | tp1046 4632 | (g14 4633 | g14 4634 | I0 4635 | I0 4636 | I0 4637 | g14 4638 | g14 4639 | g14 4640 | tp1047 4641 | (g19 4642 | I0 4643 | I0 4644 | S'Qw' 4645 | p1048 4646 | g22 4647 | g20 4648 | g16 4649 | g19 4650 | tp1049 4651 | tp1050 4652 | I1 4653 | ((I01 4654 | I01 4655 | tp1051 4656 | (I01 4657 | I01 4658 | tp1052 4659 | tp1053 4660 | tp1054 4661 | (lp1055 4662 | (lp1056 4663 | (I4 4664 | I0 4665 | tp1057 4666 | a(I6 4667 | I0 4668 | tp1058 4669 | aas(((g348 4670 | I0 4671 | g349 4672 | S'Qb' 4673 | p1059 4674 | g351 4675 | I0 4676 | I0 4677 | g348 4678 | tp1060 4679 | (I0 4680 | I0 4681 | g354 4682 | g354 4683 | g349 4684 | g354 4685 | g354 4686 | g354 4687 | tp1061 4688 | (g354 4689 | I0 4690 | g352 4691 | I0 4692 | I0 4693 | g352 4694 | I0 4695 | I0 4696 | tp1062 4697 | (I0 4698 | g354 4699 | I0 4700 | I0 4701 | g354 4702 | I0 4703 | I0 4704 | I0 4705 | tp1063 4706 | (g357 4707 | I0 4708 | I0 4709 | I0 4710 | g359 4711 | I0 4712 | I0 4713 | I0 4714 | tp1064 4715 | (I0 4716 | I0 4717 | I0 4718 | I0 4719 | I0 4720 | g361 4721 | I0 4722 | I0 4723 | tp1065 4724 | (g359 4725 | g359 4726 | g359 4727 | g359 4728 | I0 4729 | g359 4730 | g359 4731 | g359 4732 | tp1066 4733 | (g364 4734 | g361 4735 | g357 4736 | S'Qw' 4737 | p1067 4738 | g618 4739 | I0 4740 | g366 4741 | I0 4742 | tp1068 4743 | tp1069 4744 | I0 4745 | ((I00 4746 | I00 4747 | tp1070 4748 | (I01 4749 | I01 4750 | tp1071 4751 | tp1072 4752 | tp1073 4753 | (lp1074 4754 | (lp1075 4755 | (I0 4756 | I4 4757 | tp1076 4758 | a(I1 4759 | I5 4760 | tp1077 4761 | aas(((g140 4762 | g141 4763 | g142 4764 | S'Qb' 4765 | p1078 4766 | g144 4767 | g142 4768 | g141 4769 | g140 4770 | tp1079 4771 | (g146 4772 | g146 4773 | g146 4774 | g146 4775 | I0 4776 | g146 4777 | g146 4778 | g146 4779 | tp1080 4780 | (I0 4781 | I0 4782 | I0 4783 | I0 4784 | g146 4785 | I0 4786 | I0 4787 | I0 4788 | tp1081 4789 | (I0 4790 | I0 4791 | I0 4792 | I0 4793 | I0 4794 | I0 4795 | I0 4796 | I0 4797 | tp1082 4798 | (I0 4799 | I0 4800 | I0 4801 | g150 4802 | g150 4803 | I0 4804 | I0 4805 | I0 4806 | tp1083 4807 | (I0 4808 | I0 4809 | I0 4810 | I0 4811 | I0 4812 | I0 4813 | I0 4814 | I0 4815 | tp1084 4816 | (g150 4817 | g150 4818 | g150 4819 | I0 4820 | I0 4821 | g150 4822 | g150 4823 | g150 4824 | tp1085 4825 | (g155 4826 | g152 4827 | g156 4828 | S'Qw' 4829 | p1086 4830 | g158 4831 | g156 4832 | g152 4833 | g155 4834 | tp1087 4835 | tp1088 4836 | I1 4837 | ((I01 4838 | I01 4839 | tp1089 4840 | (I01 4841 | I01 4842 | tp1090 4843 | tp1091 4844 | tp1092 4845 | (lp1093 4846 | (lp1094 4847 | (I3 4848 | I1 4849 | tp1095 4850 | a(I3 4851 | I3 4852 | tp1096 4853 | aas(((g140 4854 | g141 4855 | g142 4856 | S'Qb' 4857 | p1097 4858 | g144 4859 | g142 4860 | g141 4861 | g140 4862 | tp1098 4863 | (g146 4864 | g146 4865 | g146 4866 | I0 4867 | I0 4868 | g146 4869 | g146 4870 | g146 4871 | tp1099 4872 | (I0 4873 | I0 4874 | I0 4875 | I0 4876 | g146 4877 | I0 4878 | I0 4879 | I0 4880 | tp1100 4881 | (I0 4882 | I0 4883 | I0 4884 | g146 4885 | I0 4886 | I0 4887 | I0 4888 | I0 4889 | tp1101 4890 | (I0 4891 | I0 4892 | I0 4893 | g150 4894 | g150 4895 | I0 4896 | I0 4897 | I0 4898 | tp1102 4899 | (I0 4900 | I0 4901 | I0 4902 | I0 4903 | I0 4904 | I0 4905 | I0 4906 | I0 4907 | tp1103 4908 | (g150 4909 | g150 4910 | g150 4911 | I0 4912 | I0 4913 | g150 4914 | g150 4915 | g150 4916 | tp1104 4917 | (g155 4918 | g152 4919 | g156 4920 | S'Qw' 4921 | p1105 4922 | g158 4923 | g156 4924 | g152 4925 | g155 4926 | tp1106 4927 | tp1107 4928 | I0 4929 | ((I01 4930 | I01 4931 | tp1108 4932 | (I01 4933 | I01 4934 | tp1109 4935 | tp1110 4936 | tp1111 4937 | (lp1112 4938 | (lp1113 4939 | (I1 4940 | I7 4941 | tp1114 4942 | a(I2 4943 | I5 4944 | tp1115 4945 | aa(lp1116 4946 | (I1 4947 | I7 4948 | tp1117 4949 | a(I3 4950 | I6 4951 | tp1118 4952 | aas(((g504 4953 | I0 4954 | g505 4955 | S'Qb' 4956 | p1119 4957 | g507 4958 | g505 4959 | I0 4960 | g504 4961 | tp1120 4962 | (g510 4963 | g510 4964 | I0 4965 | g510 4966 | g510 4967 | g510 4968 | g510 4969 | g510 4970 | tp1121 4971 | (I0 4972 | I0 4973 | g508 4974 | I0 4975 | I0 4976 | g508 4977 | I0 4978 | I0 4979 | tp1122 4980 | (I0 4981 | I0 4982 | I0 4983 | I0 4984 | I0 4985 | I0 4986 | I0 4987 | I0 4988 | tp1123 4989 | (I0 4990 | I0 4991 | I0 4992 | g514 4993 | g515 4994 | I0 4995 | I0 4996 | I0 4997 | tp1124 4998 | (I0 4999 | I0 5000 | I0 5001 | I0 5002 | I0 5003 | I0 5004 | I0 5005 | I0 5006 | tp1125 5007 | (g515 5008 | g515 5009 | g515 5010 | I0 5011 | I0 5012 | g515 5013 | g515 5014 | g515 5015 | tp1126 5016 | (g519 5017 | g514 5018 | g520 5019 | S'Qw' 5020 | p1127 5021 | g522 5022 | g520 5023 | I0 5024 | g519 5025 | tp1128 5026 | tp1129 5027 | I0 5028 | ((I01 5029 | I01 5030 | tp1130 5031 | (I01 5032 | I01 5033 | tp1131 5034 | tp1132 5035 | tp1133 5036 | (lp1134 5037 | (lp1135 5038 | (I1 5039 | I7 5040 | tp1136 5041 | a(I2 5042 | I5 5043 | tp1137 5044 | aas(((g110 5045 | g111 5046 | g112 5047 | S'Qb' 5048 | p1138 5049 | g115 5050 | I0 5051 | I0 5052 | g110 5053 | tp1139 5054 | (g117 5055 | g117 5056 | g117 5057 | g117 5058 | I0 5059 | g117 5060 | g117 5061 | g117 5062 | tp1140 5063 | (I0 5064 | I0 5065 | I0 5066 | I0 5067 | g117 5068 | g111 5069 | I0 5070 | I0 5071 | tp1141 5072 | (I0 5073 | I0 5074 | I0 5075 | I0 5076 | I0 5077 | I0 5078 | I0 5079 | I0 5080 | tp1142 5081 | (I0 5082 | g112 5083 | g121 5084 | g121 5085 | I0 5086 | I0 5087 | I0 5088 | I0 5089 | tp1143 5090 | (I0 5091 | I0 5092 | g123 5093 | I0 5094 | I0 5095 | I0 5096 | I0 5097 | I0 5098 | tp1144 5099 | (g121 5100 | g121 5101 | I0 5102 | I0 5103 | g121 5104 | g121 5105 | g121 5106 | g121 5107 | tp1145 5108 | (g127 5109 | I0 5110 | g124 5111 | S'Qw' 5112 | p1146 5113 | g129 5114 | g124 5115 | g123 5116 | g127 5117 | tp1147 5118 | tp1148 5119 | I0 5120 | ((I01 5121 | I01 5122 | tp1149 5123 | (I01 5124 | I01 5125 | tp1150 5126 | tp1151 5127 | tp1152 5128 | (lp1153 5129 | (lp1154 5130 | (I4 5131 | I6 5132 | tp1155 5133 | a(I4 5134 | I5 5135 | tp1156 5136 | aas(((g110 5137 | g111 5138 | g112 5139 | S'Qb' 5140 | p1157 5141 | g115 5142 | g112 5143 | I0 5144 | g110 5145 | tp1158 5146 | (g117 5147 | g117 5148 | g117 5149 | g117 5150 | g117 5151 | g117 5152 | g117 5153 | g117 5154 | tp1159 5155 | (I0 5156 | I0 5157 | I0 5158 | I0 5159 | I0 5160 | g111 5161 | I0 5162 | I0 5163 | tp1160 5164 | (I0 5165 | I0 5166 | I0 5167 | I0 5168 | I0 5169 | I0 5170 | I0 5171 | I0 5172 | tp1161 5173 | (I0 5174 | I0 5175 | I0 5176 | g121 5177 | I0 5178 | I0 5179 | I0 5180 | I0 5181 | tp1162 5182 | (I0 5183 | I0 5184 | I0 5185 | I0 5186 | I0 5187 | I0 5188 | I0 5189 | I0 5190 | tp1163 5191 | (g121 5192 | g121 5193 | g121 5194 | I0 5195 | g121 5196 | g121 5197 | g121 5198 | g121 5199 | tp1164 5200 | (g127 5201 | g123 5202 | g124 5203 | S'Qw' 5204 | p1165 5205 | g129 5206 | g124 5207 | g123 5208 | g127 5209 | tp1166 5210 | tp1167 5211 | I0 5212 | ((I01 5213 | I01 5214 | tp1168 5215 | (I01 5216 | I01 5217 | tp1169 5218 | tp1170 5219 | tp1171 5220 | (lp1172 5221 | (lp1173 5222 | (I2 5223 | I6 5224 | tp1174 5225 | a(I2 5226 | I4 5227 | tp1175 5228 | aas(((g4 5229 | g5 5230 | g6 5231 | S'Qb' 5232 | p1176 5233 | g8 5234 | I0 5235 | I0 5236 | g4 5237 | tp1177 5238 | (g10 5239 | g10 5240 | g10 5241 | I0 5242 | g6 5243 | g10 5244 | g10 5245 | g10 5246 | tp1178 5247 | (I0 5248 | I0 5249 | I0 5250 | I0 5251 | g10 5252 | g5 5253 | I0 5254 | I0 5255 | tp1179 5256 | (I0 5257 | I0 5258 | I0 5259 | g10 5260 | I0 5261 | I0 5262 | g20 5263 | I0 5264 | tp1180 5265 | (I0 5266 | I0 5267 | g14 5268 | g14 5269 | I0 5270 | I0 5271 | I0 5272 | I0 5273 | tp1181 5274 | (I0 5275 | I0 5276 | g16 5277 | I0 5278 | I0 5279 | I0 5280 | I0 5281 | I0 5282 | tp1182 5283 | (g14 5284 | g14 5285 | I0 5286 | I0 5287 | g14 5288 | g14 5289 | g14 5290 | g14 5291 | tp1183 5292 | (g19 5293 | I0 5294 | I0 5295 | S'Qw' 5296 | p1184 5297 | g22 5298 | g20 5299 | g16 5300 | g19 5301 | tp1185 5302 | tp1186 5303 | I0 5304 | ((I01 5305 | I01 5306 | tp1187 5307 | (I01 5308 | I01 5309 | tp1188 5310 | tp1189 5311 | tp1190 5312 | (lp1191 5313 | (lp1192 5314 | (I4 5315 | I6 5316 | tp1193 5317 | a(I4 5318 | I5 5319 | tp1194 5320 | aas(((g169 5321 | g170 5322 | g171 5323 | S'Qb' 5324 | p1195 5325 | g173 5326 | g171 5327 | g170 5328 | g169 5329 | tp1196 5330 | (g175 5331 | g175 5332 | g175 5333 | I0 5334 | I0 5335 | g175 5336 | g175 5337 | g175 5338 | tp1197 5339 | (I0 5340 | I0 5341 | I0 5342 | g175 5343 | I0 5344 | I0 5345 | I0 5346 | I0 5347 | tp1198 5348 | (I0 5349 | I0 5350 | I0 5351 | I0 5352 | I0 5353 | I0 5354 | I0 5355 | I0 5356 | tp1199 5357 | (I0 5358 | I0 5359 | I0 5360 | g181 5361 | g179 5362 | I0 5363 | I0 5364 | I0 5365 | tp1200 5366 | (I0 5367 | I0 5368 | I0 5369 | I0 5370 | I0 5371 | I0 5372 | I0 5373 | I0 5374 | tp1201 5375 | (g179 5376 | g179 5377 | g179 5378 | I0 5379 | I0 5380 | g179 5381 | g179 5382 | g179 5383 | tp1202 5384 | (g184 5385 | g181 5386 | g185 5387 | S'Qw' 5388 | p1203 5389 | g187 5390 | g185 5391 | I0 5392 | g184 5393 | tp1204 5394 | tp1205 5395 | I1 5396 | ((I01 5397 | I01 5398 | tp1206 5399 | (I01 5400 | I01 5401 | tp1207 5402 | tp1208 5403 | tp1209 5404 | (lp1210 5405 | (lp1211 5406 | (I6 5407 | I0 5408 | tp1212 5409 | a(I5 5410 | I2 5411 | tp1213 5412 | aas(((g415 5413 | g416 5414 | g417 5415 | S'Qb' 5416 | p1214 5417 | g419 5418 | g417 5419 | I0 5420 | g415 5421 | tp1215 5422 | (g421 5423 | g421 5424 | g421 5425 | g416 5426 | I0 5427 | g421 5428 | g421 5429 | g421 5430 | tp1216 5431 | (I0 5432 | I0 5433 | I0 5434 | I0 5435 | g421 5436 | I0 5437 | I0 5438 | I0 5439 | tp1217 5440 | (I0 5441 | I0 5442 | I0 5443 | g421 5444 | g424 5445 | I0 5446 | I0 5447 | I0 5448 | tp1218 5449 | (I0 5450 | I0 5451 | I0 5452 | g424 5453 | I0 5454 | I0 5455 | I0 5456 | I0 5457 | tp1219 5458 | (I0 5459 | I0 5460 | I0 5461 | I0 5462 | I0 5463 | I0 5464 | I0 5465 | I0 5466 | tp1220 5467 | (g424 5468 | g424 5469 | g424 5470 | g428 5471 | I0 5472 | g424 5473 | g424 5474 | g424 5475 | tp1221 5476 | (g430 5477 | I0 5478 | g431 5479 | S'Qw' 5480 | p1222 5481 | g433 5482 | g431 5483 | g428 5484 | g430 5485 | tp1223 5486 | tp1224 5487 | I0 5488 | ((I01 5489 | I01 5490 | tp1225 5491 | (I01 5492 | I01 5493 | tp1226 5494 | tp1227 5495 | tp1228 5496 | (lp1229 5497 | (lp1230 5498 | (I5 5499 | I7 5500 | tp1231 5501 | a(I3 5502 | I5 5503 | tp1232 5504 | aas(((g504 5505 | I0 5506 | g505 5507 | S'Qb' 5508 | p1233 5509 | g507 5510 | g505 5511 | g508 5512 | g504 5513 | tp1234 5514 | (g510 5515 | g510 5516 | I0 5517 | g510 5518 | g510 5519 | g510 5520 | g510 5521 | g510 5522 | tp1235 5523 | (I0 5524 | I0 5525 | g508 5526 | I0 5527 | I0 5528 | I0 5529 | I0 5530 | I0 5531 | tp1236 5532 | (I0 5533 | I0 5534 | g510 5535 | I0 5536 | I0 5537 | I0 5538 | I0 5539 | I0 5540 | tp1237 5541 | (I0 5542 | I0 5543 | I0 5544 | I0 5545 | g515 5546 | I0 5547 | I0 5548 | I0 5549 | tp1238 5550 | (I0 5551 | I0 5552 | I0 5553 | I0 5554 | I0 5555 | g514 5556 | I0 5557 | I0 5558 | tp1239 5559 | (g515 5560 | g515 5561 | g515 5562 | g515 5563 | I0 5564 | g515 5565 | g515 5566 | g515 5567 | tp1240 5568 | (g519 5569 | g514 5570 | g520 5571 | S'Qw' 5572 | p1241 5573 | g522 5574 | g520 5575 | I0 5576 | g519 5577 | tp1242 5578 | tp1243 5579 | I0 5580 | ((I01 5581 | I01 5582 | tp1244 5583 | (I01 5584 | I01 5585 | tp1245 5586 | tp1246 5587 | tp1247 5588 | (lp1248 5589 | (lp1249 5590 | (I3 5591 | I6 5592 | tp1250 5593 | a(I3 5594 | I4 5595 | tp1251 5596 | aas(((g504 5597 | I0 5598 | g505 5599 | S'Qb' 5600 | p1252 5601 | g507 5602 | g505 5603 | g508 5604 | g504 5605 | tp1253 5606 | (g510 5607 | g510 5608 | I0 5609 | g510 5610 | g510 5611 | g510 5612 | g510 5613 | g510 5614 | tp1254 5615 | (I0 5616 | I0 5617 | g508 5618 | I0 5619 | I0 5620 | I0 5621 | I0 5622 | I0 5623 | tp1255 5624 | (I0 5625 | I0 5626 | I0 5627 | I0 5628 | I0 5629 | I0 5630 | I0 5631 | I0 5632 | tp1256 5633 | (I0 5634 | I0 5635 | I0 5636 | g510 5637 | g515 5638 | I0 5639 | I0 5640 | I0 5641 | tp1257 5642 | (I0 5643 | I0 5644 | I0 5645 | I0 5646 | I0 5647 | g514 5648 | I0 5649 | I0 5650 | tp1258 5651 | (g515 5652 | g515 5653 | g515 5654 | I0 5655 | I0 5656 | g515 5657 | g515 5658 | g515 5659 | tp1259 5660 | (g519 5661 | g514 5662 | g520 5663 | S'Qw' 5664 | p1260 5665 | g522 5666 | g520 5667 | I0 5668 | g519 5669 | tp1261 5670 | tp1262 5671 | I0 5672 | ((I01 5673 | I01 5674 | tp1263 5675 | (I01 5676 | I01 5677 | tp1264 5678 | tp1265 5679 | tp1266 5680 | (lp1267 5681 | (lp1268 5682 | (I5 5683 | I5 5684 | tp1269 5685 | a(I3 5686 | I4 5687 | tp1270 5688 | aas(((g62 5689 | g63 5690 | g64 5691 | S'Qb' 5692 | p1271 5693 | g66 5694 | g64 5695 | g63 5696 | g62 5697 | tp1272 5698 | (g68 5699 | g68 5700 | I0 5701 | I0 5702 | g68 5703 | g68 5704 | g68 5705 | g68 5706 | tp1273 5707 | (I0 5708 | I0 5709 | I0 5710 | g68 5711 | I0 5712 | I0 5713 | I0 5714 | I0 5715 | tp1274 5716 | (I0 5717 | I0 5718 | g68 5719 | I0 5720 | I0 5721 | I0 5722 | I0 5723 | I0 5724 | tp1275 5725 | (I0 5726 | I0 5727 | I0 5728 | I0 5729 | g73 5730 | I0 5731 | I0 5732 | I0 5733 | tp1276 5734 | (I0 5735 | I0 5736 | I0 5737 | I0 5738 | I0 5739 | g72 5740 | I0 5741 | I0 5742 | tp1277 5743 | (g73 5744 | g73 5745 | g73 5746 | g73 5747 | I0 5748 | g73 5749 | g73 5750 | g73 5751 | tp1278 5752 | (g77 5753 | g72 5754 | g78 5755 | S'Qw' 5756 | p1279 5757 | g80 5758 | g78 5759 | I0 5760 | g77 5761 | tp1280 5762 | tp1281 5763 | I0 5764 | ((I01 5765 | I01 5766 | tp1282 5767 | (I01 5768 | I01 5769 | tp1283 5770 | tp1284 5771 | tp1285 5772 | (lp1286 5773 | (lp1287 5774 | (I3 5775 | I6 5776 | tp1288 5777 | a(I3 5778 | I4 5779 | tp1289 5780 | aas(((g62 5781 | g63 5782 | g64 5783 | S'Qb' 5784 | p1290 5785 | g66 5786 | g64 5787 | g63 5788 | g62 5789 | tp1291 5790 | (g68 5791 | g68 5792 | I0 5793 | I0 5794 | g68 5795 | g68 5796 | g68 5797 | g68 5798 | tp1292 5799 | (I0 5800 | I0 5801 | I0 5802 | g68 5803 | I0 5804 | I0 5805 | I0 5806 | I0 5807 | tp1293 5808 | (I0 5809 | I0 5810 | g68 5811 | I0 5812 | I0 5813 | I0 5814 | I0 5815 | I0 5816 | tp1294 5817 | (I0 5818 | I0 5819 | I0 5820 | g73 5821 | g73 5822 | I0 5823 | I0 5824 | I0 5825 | tp1295 5826 | (I0 5827 | I0 5828 | I0 5829 | I0 5830 | I0 5831 | g72 5832 | I0 5833 | I0 5834 | tp1296 5835 | (g73 5836 | g73 5837 | g73 5838 | I0 5839 | I0 5840 | g73 5841 | g73 5842 | g73 5843 | tp1297 5844 | (g77 5845 | g72 5846 | g78 5847 | S'Qw' 5848 | p1298 5849 | g80 5850 | g78 5851 | I0 5852 | g77 5853 | tp1299 5854 | tp1300 5855 | I1 5856 | ((I01 5857 | I01 5858 | tp1301 5859 | (I01 5860 | I01 5861 | tp1302 5862 | tp1303 5863 | tp1304 5864 | (lp1305 5865 | (lp1306 5866 | (I2 5867 | I3 5868 | tp1307 5869 | a(I3 5870 | I4 5871 | tp1308 5872 | aas(((g62 5873 | g63 5874 | g64 5875 | S'Qb' 5876 | p1309 5877 | g66 5878 | g64 5879 | I0 5880 | g62 5881 | tp1310 5882 | (g68 5883 | g68 5884 | I0 5885 | I0 5886 | g68 5887 | g68 5888 | g68 5889 | g68 5890 | tp1311 5891 | (I0 5892 | I0 5893 | I0 5894 | g68 5895 | I0 5896 | g63 5897 | I0 5898 | I0 5899 | tp1312 5900 | (I0 5901 | I0 5902 | I0 5903 | I0 5904 | I0 5905 | I0 5906 | I0 5907 | I0 5908 | tp1313 5909 | (I0 5910 | I0 5911 | I0 5912 | g72 5913 | g73 5914 | I0 5915 | I0 5916 | I0 5917 | tp1314 5918 | (I0 5919 | I0 5920 | g72 5921 | I0 5922 | I0 5923 | I0 5924 | I0 5925 | I0 5926 | tp1315 5927 | (g73 5928 | g73 5929 | g73 5930 | I0 5931 | I0 5932 | g73 5933 | g73 5934 | g73 5935 | tp1316 5936 | (g77 5937 | I0 5938 | g78 5939 | S'Qw' 5940 | p1317 5941 | g80 5942 | g78 5943 | I0 5944 | g77 5945 | tp1318 5946 | tp1319 5947 | I1 5948 | ((I01 5949 | I01 5950 | tp1320 5951 | (I01 5952 | I01 5953 | tp1321 5954 | tp1322 5955 | tp1323 5956 | (lp1324 5957 | (lp1325 5958 | (I0 5959 | I1 5960 | tp1326 5961 | a(I0 5962 | I2 5963 | tp1327 5964 | aas(((g110 5965 | g111 5966 | g112 5967 | S'Qb' 5968 | p1328 5969 | g115 5970 | g112 5971 | I0 5972 | g110 5973 | tp1329 5974 | (g117 5975 | g117 5976 | g117 5977 | g117 5978 | I0 5979 | g117 5980 | g117 5981 | g117 5982 | tp1330 5983 | (I0 5984 | I0 5985 | I0 5986 | I0 5987 | g117 5988 | g111 5989 | I0 5990 | I0 5991 | tp1331 5992 | (I0 5993 | I0 5994 | I0 5995 | I0 5996 | I0 5997 | I0 5998 | I0 5999 | I0 6000 | tp1332 6001 | (I0 6002 | I0 6003 | g121 6004 | g121 6005 | I0 6006 | I0 6007 | I0 6008 | I0 6009 | tp1333 6010 | (I0 6011 | I0 6012 | I0 6013 | I0 6014 | I0 6015 | I0 6016 | I0 6017 | I0 6018 | tp1334 6019 | (g121 6020 | g121 6021 | I0 6022 | I0 6023 | g121 6024 | g121 6025 | g121 6026 | g121 6027 | tp1335 6028 | (g127 6029 | g123 6030 | g124 6031 | S'Qw' 6032 | p1336 6033 | g129 6034 | g124 6035 | g123 6036 | g127 6037 | tp1337 6038 | tp1338 6039 | I0 6040 | ((I01 6041 | I01 6042 | tp1339 6043 | (I01 6044 | I01 6045 | tp1340 6046 | tp1341 6047 | tp1342 6048 | (lp1343 6049 | (lp1344 6050 | (I1 6051 | I7 6052 | tp1345 6053 | a(I2 6054 | I5 6055 | tp1346 6056 | aas(((g110 6057 | g111 6058 | g112 6059 | S'Qb' 6060 | p1347 6061 | g115 6062 | g112 6063 | I0 6064 | g110 6065 | tp1348 6066 | (g117 6067 | g117 6068 | g117 6069 | g117 6070 | I0 6071 | g117 6072 | g117 6073 | g117 6074 | tp1349 6075 | (I0 6076 | I0 6077 | I0 6078 | I0 6079 | g117 6080 | g111 6081 | I0 6082 | I0 6083 | tp1350 6084 | (I0 6085 | I0 6086 | I0 6087 | I0 6088 | I0 6089 | I0 6090 | I0 6091 | I0 6092 | tp1351 6093 | (I0 6094 | I0 6095 | g121 6096 | g121 6097 | I0 6098 | I0 6099 | I0 6100 | I0 6101 | tp1352 6102 | (I0 6103 | I0 6104 | g123 6105 | I0 6106 | I0 6107 | I0 6108 | I0 6109 | I0 6110 | tp1353 6111 | (g121 6112 | g121 6113 | I0 6114 | I0 6115 | g121 6116 | g121 6117 | g121 6118 | g121 6119 | tp1354 6120 | (g127 6121 | I0 6122 | g124 6123 | S'Qw' 6124 | p1355 6125 | g129 6126 | g124 6127 | g123 6128 | g127 6129 | tp1356 6130 | tp1357 6131 | I1 6132 | ((I01 6133 | I01 6134 | tp1358 6135 | (I01 6136 | I01 6137 | tp1359 6138 | tp1360 6139 | tp1361 6140 | (lp1362 6141 | (lp1363 6142 | (I5 6143 | I0 6144 | tp1364 6145 | a(I1 6146 | I4 6147 | tp1365 6148 | aas(((g33 6149 | g34 6150 | g35 6151 | S'Qb' 6152 | p1366 6153 | I0 6154 | g266 6155 | g37 6156 | I0 6157 | tp1367 6158 | (g39 6159 | g39 6160 | g39 6161 | I0 6162 | g39 6163 | g39 6164 | g35 6165 | g39 6166 | tp1368 6167 | (I0 6168 | I0 6169 | I0 6170 | g39 6171 | I0 6172 | g34 6173 | g39 6174 | I0 6175 | tp1369 6176 | (I0 6177 | I0 6178 | I0 6179 | I0 6180 | I0 6181 | I0 6182 | I0 6183 | I0 6184 | tp1370 6185 | (I0 6186 | I0 6187 | g43 6188 | g43 6189 | g43 6190 | I0 6191 | I0 6192 | I0 6193 | tp1371 6194 | (I0 6195 | I0 6196 | g45 6197 | I0 6198 | I0 6199 | g45 6200 | I0 6201 | I0 6202 | tp1372 6203 | (g43 6204 | g43 6205 | I0 6206 | I0 6207 | g49 6208 | g43 6209 | g43 6210 | g43 6211 | tp1373 6212 | (g48 6213 | I0 6214 | g49 6215 | S'Qw' 6216 | p1374 6217 | g51 6218 | I0 6219 | I0 6220 | g48 6221 | tp1375 6222 | tp1376 6223 | I1 6224 | ((I01 6225 | I01 6226 | tp1377 6227 | (I00 6228 | I00 6229 | tp1378 6230 | tp1379 6231 | tp1380 6232 | (lp1381 6233 | (lp1382 6234 | (I4 6235 | I1 6236 | tp1383 6237 | a(I4 6238 | I3 6239 | tp1384 6240 | aas(((g415 6241 | g416 6242 | g417 6243 | S'Qb' 6244 | p1385 6245 | g419 6246 | g417 6247 | g416 6248 | g415 6249 | tp1386 6250 | (g421 6251 | g421 6252 | g421 6253 | I0 6254 | I0 6255 | g421 6256 | g421 6257 | g421 6258 | tp1387 6259 | (I0 6260 | I0 6261 | I0 6262 | I0 6263 | g421 6264 | I0 6265 | I0 6266 | I0 6267 | tp1388 6268 | (I0 6269 | I0 6270 | I0 6271 | g421 6272 | I0 6273 | I0 6274 | I0 6275 | I0 6276 | tp1389 6277 | (I0 6278 | I0 6279 | I0 6280 | g424 6281 | g424 6282 | I0 6283 | I0 6284 | I0 6285 | tp1390 6286 | (I0 6287 | I0 6288 | I0 6289 | I0 6290 | I0 6291 | I0 6292 | I0 6293 | I0 6294 | tp1391 6295 | (g424 6296 | g424 6297 | g424 6298 | g428 6299 | I0 6300 | g424 6301 | g424 6302 | g424 6303 | tp1392 6304 | (g430 6305 | I0 6306 | g431 6307 | S'Qw' 6308 | p1393 6309 | g433 6310 | g431 6311 | g428 6312 | g430 6313 | tp1394 6314 | tp1395 6315 | I1 6316 | ((I01 6317 | I01 6318 | tp1396 6319 | (I01 6320 | I01 6321 | tp1397 6322 | tp1398 6323 | tp1399 6324 | (lp1400 6325 | (lp1401 6326 | (I6 6327 | I0 6328 | tp1402 6329 | a(I5 6330 | I2 6331 | tp1403 6332 | aas(((g169 6333 | g170 6334 | g171 6335 | S'Qb' 6336 | p1404 6337 | g173 6338 | I0 6339 | I0 6340 | g169 6341 | tp1405 6342 | (g175 6343 | g175 6344 | g175 6345 | I0 6346 | g171 6347 | g175 6348 | g175 6349 | g175 6350 | tp1406 6351 | (I0 6352 | I0 6353 | I0 6354 | g175 6355 | I0 6356 | g170 6357 | I0 6358 | I0 6359 | tp1407 6360 | (I0 6361 | I0 6362 | I0 6363 | I0 6364 | I0 6365 | I0 6366 | I0 6367 | I0 6368 | tp1408 6369 | (I0 6370 | I0 6371 | I0 6372 | g181 6373 | g179 6374 | I0 6375 | I0 6376 | I0 6377 | tp1409 6378 | (I0 6379 | I0 6380 | g181 6381 | I0 6382 | I0 6383 | I0 6384 | I0 6385 | I0 6386 | tp1410 6387 | (g179 6388 | g179 6389 | g179 6390 | I0 6391 | I0 6392 | g179 6393 | g179 6394 | g179 6395 | tp1411 6396 | (g184 6397 | I0 6398 | g185 6399 | S'Qw' 6400 | p1412 6401 | g187 6402 | g185 6403 | I0 6404 | g184 6405 | tp1413 6406 | tp1414 6407 | I0 6408 | ((I01 6409 | I01 6410 | tp1415 6411 | (I01 6412 | I01 6413 | tp1416 6414 | tp1417 6415 | tp1418 6416 | (lp1419 6417 | (lp1420 6418 | (I5 6419 | I7 6420 | tp1421 6421 | a(I4 6422 | I6 6423 | tp1422 6424 | aas(((g236 6425 | I0 6426 | g237 6427 | S'Qb' 6428 | p1423 6429 | g239 6430 | I0 6431 | g240 6432 | g236 6433 | tp1424 6434 | (g242 6435 | g242 6436 | g242 6437 | g242 6438 | I0 6439 | g242 6440 | g242 6441 | g242 6442 | tp1425 6443 | (I0 6444 | I0 6445 | g240 6446 | I0 6447 | I0 6448 | I0 6449 | I0 6450 | I0 6451 | tp1426 6452 | (I0 6453 | I0 6454 | g237 6455 | I0 6456 | g242 6457 | I0 6458 | I0 6459 | I0 6460 | tp1427 6461 | (I0 6462 | I0 6463 | g246 6464 | I0 6465 | g247 6466 | I0 6467 | I0 6468 | I0 6469 | tp1428 6470 | (I0 6471 | I0 6472 | g247 6473 | I0 6474 | I0 6475 | g249 6476 | I0 6477 | I0 6478 | tp1429 6479 | (g247 6480 | g247 6481 | I0 6482 | g247 6483 | I0 6484 | g247 6485 | g247 6486 | g247 6487 | tp1430 6488 | (g252 6489 | g249 6490 | g246 6491 | S'Qw' 6492 | p1431 6493 | g254 6494 | I0 6495 | I0 6496 | g252 6497 | tp1432 6498 | tp1433 6499 | I1 6500 | ((I01 6501 | I01 6502 | tp1434 6503 | (I01 6504 | I01 6505 | tp1435 6506 | tp1436 6507 | tp1437 6508 | (lp1438 6509 | (lp1439 6510 | (I6 6511 | I0 6512 | tp1440 6513 | a(I5 6514 | I2 6515 | tp1441 6516 | aas(((g236 6517 | I0 6518 | g237 6519 | S'Qb' 6520 | p1442 6521 | g239 6522 | I0 6523 | g240 6524 | g236 6525 | tp1443 6526 | (g242 6527 | g242 6528 | g242 6529 | g242 6530 | I0 6531 | g242 6532 | g242 6533 | g242 6534 | tp1444 6535 | (I0 6536 | I0 6537 | g240 6538 | I0 6539 | I0 6540 | I0 6541 | I0 6542 | I0 6543 | tp1445 6544 | (I0 6545 | I0 6546 | g237 6547 | I0 6548 | g242 6549 | I0 6550 | I0 6551 | I0 6552 | tp1446 6553 | (I0 6554 | I0 6555 | g246 6556 | I0 6557 | g247 6558 | I0 6559 | I0 6560 | I0 6561 | tp1447 6562 | (I0 6563 | I0 6564 | I0 6565 | I0 6566 | I0 6567 | g249 6568 | I0 6569 | I0 6570 | tp1448 6571 | (g247 6572 | g247 6573 | g247 6574 | g247 6575 | I0 6576 | g247 6577 | g247 6578 | g247 6579 | tp1449 6580 | (g252 6581 | g249 6582 | g246 6583 | S'Qw' 6584 | p1450 6585 | g254 6586 | I0 6587 | I0 6588 | g252 6589 | tp1451 6590 | tp1452 6591 | I0 6592 | ((I01 6593 | I01 6594 | tp1453 6595 | (I01 6596 | I01 6597 | tp1454 6598 | tp1455 6599 | tp1456 6600 | (lp1457 6601 | (lp1458 6602 | (I2 6603 | I6 6604 | tp1459 6605 | a(I2 6606 | I5 6607 | tp1460 6608 | aas(((g169 6609 | g170 6610 | g171 6611 | S'Qb' 6612 | p1461 6613 | g173 6614 | g171 6615 | I0 6616 | g169 6617 | tp1462 6618 | (g175 6619 | g175 6620 | g175 6621 | I0 6622 | I0 6623 | g175 6624 | g175 6625 | g175 6626 | tp1463 6627 | (I0 6628 | I0 6629 | I0 6630 | g175 6631 | I0 6632 | g170 6633 | I0 6634 | I0 6635 | tp1464 6636 | (I0 6637 | I0 6638 | I0 6639 | I0 6640 | I0 6641 | I0 6642 | I0 6643 | I0 6644 | tp1465 6645 | (I0 6646 | I0 6647 | I0 6648 | g181 6649 | g179 6650 | I0 6651 | I0 6652 | I0 6653 | tp1466 6654 | (I0 6655 | I0 6656 | I0 6657 | I0 6658 | I0 6659 | I0 6660 | I0 6661 | I0 6662 | tp1467 6663 | (g179 6664 | g179 6665 | g179 6666 | I0 6667 | I0 6668 | g179 6669 | g179 6670 | g179 6671 | tp1468 6672 | (g184 6673 | g181 6674 | g185 6675 | S'Qw' 6676 | p1469 6677 | g187 6678 | g185 6679 | I0 6680 | g184 6681 | tp1470 6682 | tp1471 6683 | I0 6684 | ((I01 6685 | I01 6686 | tp1472 6687 | (I01 6688 | I01 6689 | tp1473 6690 | tp1474 6691 | tp1475 6692 | (lp1476 6693 | (lp1477 6694 | (I1 6695 | I7 6696 | tp1478 6697 | a(I2 6698 | I5 6699 | tp1479 6700 | aas(((g169 6701 | g170 6702 | g171 6703 | S'Qb' 6704 | p1480 6705 | g173 6706 | g171 6707 | I0 6708 | g169 6709 | tp1481 6710 | (g175 6711 | g175 6712 | g175 6713 | I0 6714 | I0 6715 | g175 6716 | g175 6717 | g175 6718 | tp1482 6719 | (I0 6720 | I0 6721 | I0 6722 | g175 6723 | I0 6724 | g170 6725 | I0 6726 | I0 6727 | tp1483 6728 | (I0 6729 | I0 6730 | I0 6731 | I0 6732 | I0 6733 | I0 6734 | I0 6735 | I0 6736 | tp1484 6737 | (I0 6738 | I0 6739 | I0 6740 | g181 6741 | g179 6742 | I0 6743 | I0 6744 | I0 6745 | tp1485 6746 | (I0 6747 | I0 6748 | g181 6749 | I0 6750 | I0 6751 | I0 6752 | I0 6753 | I0 6754 | tp1486 6755 | (g179 6756 | g179 6757 | g179 6758 | I0 6759 | I0 6760 | g179 6761 | g179 6762 | g179 6763 | tp1487 6764 | (g184 6765 | I0 6766 | g185 6767 | S'Qw' 6768 | p1488 6769 | g187 6770 | g185 6771 | I0 6772 | g184 6773 | tp1489 6774 | tp1490 6775 | I1 6776 | ((I01 6777 | I01 6778 | tp1491 6779 | (I01 6780 | I01 6781 | tp1492 6782 | tp1493 6783 | tp1494 6784 | (lp1495 6785 | (lp1496 6786 | (I5 6787 | I0 6788 | tp1497 6789 | a(I4 6790 | I1 6791 | tp1498 6792 | aas(((g504 6793 | I0 6794 | g505 6795 | S'Qb' 6796 | p1499 6797 | g507 6798 | g505 6799 | g508 6800 | g504 6801 | tp1500 6802 | (g510 6803 | g510 6804 | I0 6805 | g510 6806 | g510 6807 | g510 6808 | g510 6809 | g510 6810 | tp1501 6811 | (I0 6812 | I0 6813 | g508 6814 | I0 6815 | I0 6816 | I0 6817 | I0 6818 | I0 6819 | tp1502 6820 | (I0 6821 | I0 6822 | g510 6823 | I0 6824 | I0 6825 | I0 6826 | I0 6827 | I0 6828 | tp1503 6829 | (I0 6830 | I0 6831 | I0 6832 | g515 6833 | g515 6834 | I0 6835 | I0 6836 | I0 6837 | tp1504 6838 | (I0 6839 | I0 6840 | I0 6841 | I0 6842 | I0 6843 | g514 6844 | I0 6845 | I0 6846 | tp1505 6847 | (g515 6848 | g515 6849 | g515 6850 | I0 6851 | I0 6852 | g515 6853 | g515 6854 | g515 6855 | tp1506 6856 | (g519 6857 | g514 6858 | g520 6859 | S'Qw' 6860 | p1507 6861 | g522 6862 | g520 6863 | I0 6864 | g519 6865 | tp1508 6866 | tp1509 6867 | I1 6868 | ((I01 6869 | I01 6870 | tp1510 6871 | (I01 6872 | I01 6873 | tp1511 6874 | tp1512 6875 | tp1513 6876 | (lp1514 6877 | (lp1515 6878 | (I2 6879 | I3 6880 | tp1516 6881 | a(I3 6882 | I4 6883 | tp1517 6884 | aas(((g348 6885 | I0 6886 | g349 6887 | S'Qb' 6888 | p1518 6889 | g351 6890 | g349 6891 | g352 6892 | g348 6893 | tp1519 6894 | (I0 6895 | g354 6896 | g354 6897 | g354 6898 | I0 6899 | g354 6900 | g354 6901 | g354 6902 | tp1520 6903 | (g354 6904 | I0 6905 | g352 6906 | I0 6907 | I0 6908 | I0 6909 | I0 6910 | I0 6911 | tp1521 6912 | (I0 6913 | I0 6914 | I0 6915 | I0 6916 | g354 6917 | I0 6918 | I0 6919 | I0 6920 | tp1522 6921 | (g357 6922 | I0 6923 | I0 6924 | I0 6925 | g359 6926 | I0 6927 | I0 6928 | I0 6929 | tp1523 6930 | (I0 6931 | I0 6932 | I0 6933 | I0 6934 | I0 6935 | g361 6936 | I0 6937 | I0 6938 | tp1524 6939 | (g359 6940 | g359 6941 | g359 6942 | g359 6943 | I0 6944 | g359 6945 | g359 6946 | g359 6947 | tp1525 6948 | (g364 6949 | g361 6950 | g357 6951 | S'Qw' 6952 | p1526 6953 | g366 6954 | I0 6955 | I0 6956 | g364 6957 | tp1527 6958 | tp1528 6959 | I1 6960 | ((I01 6961 | I01 6962 | tp1529 6963 | (I01 6964 | I01 6965 | tp1530 6966 | tp1531 6967 | tp1532 6968 | (lp1533 6969 | (lp1534 6970 | (I6 6971 | I0 6972 | tp1535 6973 | a(I5 6974 | I2 6975 | tp1536 6976 | aas(((g62 6977 | g63 6978 | g64 6979 | S'Qb' 6980 | p1537 6981 | g66 6982 | g64 6983 | g63 6984 | g62 6985 | tp1538 6986 | (g68 6987 | g68 6988 | I0 6989 | g68 6990 | g68 6991 | g68 6992 | g68 6993 | g68 6994 | tp1539 6995 | (I0 6996 | I0 6997 | I0 6998 | I0 6999 | I0 7000 | I0 7001 | I0 7002 | I0 7003 | tp1540 7004 | (I0 7005 | I0 7006 | g68 7007 | I0 7008 | I0 7009 | I0 7010 | I0 7011 | I0 7012 | tp1541 7013 | (I0 7014 | I0 7015 | I0 7016 | I0 7017 | g73 7018 | I0 7019 | I0 7020 | I0 7021 | tp1542 7022 | (I0 7023 | I0 7024 | I0 7025 | I0 7026 | I0 7027 | I0 7028 | I0 7029 | I0 7030 | tp1543 7031 | (g73 7032 | g73 7033 | g73 7034 | g73 7035 | I0 7036 | g73 7037 | g73 7038 | g73 7039 | tp1544 7040 | (g77 7041 | g72 7042 | g78 7043 | S'Qw' 7044 | p1545 7045 | g80 7046 | g78 7047 | g72 7048 | g77 7049 | tp1546 7050 | tp1547 7051 | I0 7052 | ((I01 7053 | I01 7054 | tp1548 7055 | (I01 7056 | I01 7057 | tp1549 7058 | tp1550 7059 | tp1551 7060 | (lp1552 7061 | (lp1553 7062 | (I6 7063 | I7 7064 | tp1554 7065 | a(I5 7066 | I5 7067 | tp1555 7068 | aas(((g110 7069 | g111 7070 | g112 7071 | S'Qb' 7072 | p1556 7073 | g115 7074 | g112 7075 | g111 7076 | g110 7077 | tp1557 7078 | (g117 7079 | g117 7080 | g117 7081 | g117 7082 | g117 7083 | g117 7084 | g117 7085 | g117 7086 | tp1558 7087 | (I0 7088 | I0 7089 | I0 7090 | I0 7091 | I0 7092 | I0 7093 | I0 7094 | I0 7095 | tp1559 7096 | (I0 7097 | I0 7098 | I0 7099 | I0 7100 | I0 7101 | I0 7102 | I0 7103 | I0 7104 | tp1560 7105 | (I0 7106 | I0 7107 | I0 7108 | g121 7109 | I0 7110 | I0 7111 | I0 7112 | I0 7113 | tp1561 7114 | (I0 7115 | I0 7116 | I0 7117 | I0 7118 | I0 7119 | I0 7120 | I0 7121 | I0 7122 | tp1562 7123 | (g121 7124 | g121 7125 | g121 7126 | I0 7127 | g121 7128 | g121 7129 | g121 7130 | g121 7131 | tp1563 7132 | (g127 7133 | g123 7134 | g124 7135 | S'Qw' 7136 | p1564 7137 | g129 7138 | g124 7139 | g123 7140 | g127 7141 | tp1565 7142 | tp1566 7143 | I1 7144 | ((I01 7145 | I01 7146 | tp1567 7147 | (I01 7148 | I01 7149 | tp1568 7150 | tp1569 7151 | tp1570 7152 | (lp1571 7153 | (lp1572 7154 | (I6 7155 | I0 7156 | tp1573 7157 | a(I5 7158 | I2 7159 | tp1574 7160 | aa(lp1575 7161 | (I3 7162 | I1 7163 | tp1576 7164 | a(I3 7165 | I3 7166 | tp1577 7167 | aas(((g33 7168 | g34 7169 | g35 7170 | S'Qb' 7171 | p1578 7172 | I0 7173 | g266 7174 | g37 7175 | I0 7176 | tp1579 7177 | (g39 7178 | g39 7179 | g39 7180 | I0 7181 | g39 7182 | g39 7183 | g35 7184 | g39 7185 | tp1580 7186 | (I0 7187 | I0 7188 | I0 7189 | g39 7190 | I0 7191 | g34 7192 | g39 7193 | I0 7194 | tp1581 7195 | (I0 7196 | I0 7197 | I0 7198 | I0 7199 | I0 7200 | I0 7201 | I0 7202 | I0 7203 | tp1582 7204 | (I0 7205 | I0 7206 | g43 7207 | g43 7208 | g43 7209 | I0 7210 | I0 7211 | I0 7212 | tp1583 7213 | (I0 7214 | I0 7215 | g45 7216 | I0 7217 | I0 7218 | g45 7219 | I0 7220 | I0 7221 | tp1584 7222 | (g43 7223 | g43 7224 | I0 7225 | I0 7226 | I0 7227 | g43 7228 | g43 7229 | g43 7230 | tp1585 7231 | (g48 7232 | I0 7233 | g49 7234 | S'Qw' 7235 | p1586 7236 | g51 7237 | g49 7238 | I0 7239 | g48 7240 | tp1587 7241 | tp1588 7242 | I0 7243 | ((I01 7244 | I01 7245 | tp1589 7246 | (I00 7247 | I00 7248 | tp1590 7249 | tp1591 7250 | tp1592 7251 | (lp1593 7252 | (lp1594 7253 | (I5 7254 | I7 7255 | tp1595 7256 | a(I4 7257 | I6 7258 | tp1596 7259 | aas(((g169 7260 | g170 7261 | g171 7262 | S'Qb' 7263 | p1597 7264 | g173 7265 | I0 7266 | I0 7267 | g169 7268 | tp1598 7269 | (g175 7270 | g175 7271 | g175 7272 | I0 7273 | g171 7274 | g175 7275 | g175 7276 | g175 7277 | tp1599 7278 | (I0 7279 | I0 7280 | I0 7281 | g175 7282 | I0 7283 | g170 7284 | I0 7285 | I0 7286 | tp1600 7287 | (I0 7288 | I0 7289 | I0 7290 | I0 7291 | I0 7292 | I0 7293 | I0 7294 | I0 7295 | tp1601 7296 | (I0 7297 | I0 7298 | I0 7299 | g181 7300 | g179 7301 | I0 7302 | I0 7303 | I0 7304 | tp1602 7305 | (I0 7306 | I0 7307 | g181 7308 | I0 7309 | I0 7310 | I0 7311 | I0 7312 | I0 7313 | tp1603 7314 | (g179 7315 | g179 7316 | g179 7317 | I0 7318 | g185 7319 | g179 7320 | g179 7321 | g179 7322 | tp1604 7323 | (g184 7324 | I0 7325 | g185 7326 | S'Qw' 7327 | p1605 7328 | g187 7329 | I0 7330 | I0 7331 | g184 7332 | tp1606 7333 | tp1607 7334 | I1 7335 | ((I01 7336 | I01 7337 | tp1608 7338 | (I01 7339 | I01 7340 | tp1609 7341 | tp1610 7342 | tp1611 7343 | (lp1612 7344 | (lp1613 7345 | (I4 7346 | I0 7347 | tp1614 7348 | a(I6 7349 | I0 7350 | tp1615 7351 | aas(((g348 7352 | I0 7353 | g349 7354 | S'Qb' 7355 | p1616 7356 | g351 7357 | g349 7358 | g352 7359 | g348 7360 | tp1617 7361 | (g354 7362 | g354 7363 | g354 7364 | g354 7365 | I0 7366 | g354 7367 | g354 7368 | g354 7369 | tp1618 7370 | (I0 7371 | I0 7372 | g352 7373 | I0 7374 | I0 7375 | I0 7376 | I0 7377 | I0 7378 | tp1619 7379 | (I0 7380 | I0 7381 | I0 7382 | I0 7383 | g354 7384 | I0 7385 | I0 7386 | I0 7387 | tp1620 7388 | (I0 7389 | I0 7390 | I0 7391 | I0 7392 | g359 7393 | I0 7394 | I0 7395 | I0 7396 | tp1621 7397 | (I0 7398 | I0 7399 | I0 7400 | I0 7401 | I0 7402 | g361 7403 | I0 7404 | I0 7405 | tp1622 7406 | (g359 7407 | g359 7408 | g359 7409 | g359 7410 | I0 7411 | g359 7412 | g359 7413 | g359 7414 | tp1623 7415 | (g364 7416 | g361 7417 | g357 7418 | S'Qw' 7419 | p1624 7420 | g366 7421 | g357 7422 | I0 7423 | g364 7424 | tp1625 7425 | tp1626 7426 | I0 7427 | ((I01 7428 | I01 7429 | tp1627 7430 | (I01 7431 | I01 7432 | tp1628 7433 | tp1629 7434 | tp1630 7435 | (lp1631 7436 | (lp1632 7437 | (I5 7438 | I7 7439 | tp1633 7440 | a(I1 7441 | I3 7442 | tp1634 7443 | aa(lp1635 7444 | (I5 7445 | I7 7446 | tp1636 7447 | a(I2 7448 | I4 7449 | tp1637 7450 | aas(((g62 7451 | g63 7452 | g64 7453 | S'Qb' 7454 | p1638 7455 | g66 7456 | g64 7457 | g63 7458 | g62 7459 | tp1639 7460 | (g68 7461 | g68 7462 | g68 7463 | g68 7464 | g68 7465 | g68 7466 | g68 7467 | g68 7468 | tp1640 7469 | (I0 7470 | I0 7471 | I0 7472 | I0 7473 | I0 7474 | I0 7475 | I0 7476 | I0 7477 | tp1641 7478 | (I0 7479 | I0 7480 | I0 7481 | I0 7482 | I0 7483 | I0 7484 | I0 7485 | I0 7486 | tp1642 7487 | (I0 7488 | I0 7489 | I0 7490 | I0 7491 | I0 7492 | I0 7493 | I0 7494 | I0 7495 | tp1643 7496 | (I0 7497 | I0 7498 | I0 7499 | I0 7500 | I0 7501 | I0 7502 | I0 7503 | I0 7504 | tp1644 7505 | (g73 7506 | g73 7507 | g73 7508 | g73 7509 | g73 7510 | g73 7511 | g73 7512 | g73 7513 | tp1645 7514 | (g77 7515 | g72 7516 | g78 7517 | S'Qw' 7518 | p1646 7519 | g80 7520 | g78 7521 | g72 7522 | g77 7523 | tp1647 7524 | tp1648 7525 | I0 7526 | ((I01 7527 | I01 7528 | tp1649 7529 | (I01 7530 | I01 7531 | tp1650 7532 | tp1651 7533 | tp1652 7534 | (lp1653 7535 | (lp1654 7536 | (I4 7537 | I6 7538 | tp1655 7539 | a(I4 7540 | I4 7541 | tp1656 7542 | aa(lp1657 7543 | (I3 7544 | I6 7545 | tp1658 7546 | a(I3 7547 | I4 7548 | tp1659 7549 | aas(((g33 7550 | g34 7551 | g35 7552 | S'Qb' 7553 | p1660 7554 | g37 7555 | I0 7556 | I0 7557 | g33 7558 | tp1661 7559 | (g39 7560 | g39 7561 | g39 7562 | g39 7563 | g39 7564 | g39 7565 | g35 7566 | g39 7567 | tp1662 7568 | (I0 7569 | I0 7570 | I0 7571 | I0 7572 | I0 7573 | g34 7574 | g39 7575 | I0 7576 | tp1663 7577 | (I0 7578 | I0 7579 | I0 7580 | I0 7581 | I0 7582 | I0 7583 | I0 7584 | I0 7585 | tp1664 7586 | (I0 7587 | I0 7588 | g43 7589 | g43 7590 | g43 7591 | I0 7592 | I0 7593 | I0 7594 | tp1665 7595 | (I0 7596 | I0 7597 | g45 7598 | I0 7599 | I0 7600 | I0 7601 | I0 7602 | I0 7603 | tp1666 7604 | (g43 7605 | g43 7606 | I0 7607 | I0 7608 | I0 7609 | g43 7610 | g43 7611 | g43 7612 | tp1667 7613 | (g48 7614 | I0 7615 | g49 7616 | S'Qw' 7617 | p1668 7618 | g51 7619 | g49 7620 | g45 7621 | g48 7622 | tp1669 7623 | tp1670 7624 | I1 7625 | ((I01 7626 | I01 7627 | tp1671 7628 | (I01 7629 | I01 7630 | tp1672 7631 | tp1673 7632 | tp1674 7633 | (lp1675 7634 | (lp1676 7635 | (I3 7636 | I1 7637 | tp1677 7638 | a(I3 7639 | I2 7640 | tp1678 7641 | aas. -------------------------------------------------------------------------------- /Chess/readme.txt: -------------------------------------------------------------------------------- 1 | Chess Game by M. Nahin Khan. 2 | 27/11/2016 3 | Make sure Python is installed. 4 | Make sure pygames library is installed. 5 | Make sure the Media folder exists. 6 | Run chess.py 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chess in Python 2 | For the YouTube introduction, see: https://youtu.be/S1pXtoCKW-U 3 | 4 | 5 | Chess program with AI 6 | 7 | Ensure that Pygame is installed 8 | 9 | Make sure you run with Python 2, not 3! 10 | 11 | GUI inspired by: 12 | https://en.lichess.org/ 13 | 14 | Chess board image was taken from lichess website as well. 15 | The images for the pieces came from: 16 | https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Chess_Pieces_Sprite.svg/2000px-Chess_Pieces_Sprite.svg.png 17 | 18 | AI ideas from: 19 | https://chessprogramming.wikispaces.com/ 20 | 21 | An online lecture that helped me understand alpha-beta pruning: 22 | Winston, P. [MIT OpenCourseWare]. (2010) 6. Search: Games, Minimax, 23 | and Alpha-Beta. [Video File]. Retrieved from https://www.youtube.com/watch?v=STjW3eH0Cik 24 | 25 | Special thanks to professor Saquib for being so amazing. 26 | 27 | This program is a chess game. The user may play against a friend or the 28 | computer. 29 | 30 | The game state is mainly stored as a 2D list of strings, and most of the 31 | processing is thus done on a list of strings. 32 | 33 | The GUI takes the current state and displays it on the screen. The GUI allows 34 | drag and drop movement of pieces as well as click-click movement. 35 | 36 | The AI that plays against the human evaluates all possible moves made by either 37 | player up to a certain level of depth. The AI evaluates each position by giving 38 | it a score. The higher the value of the score, the more favourable a position 39 | is for white and the lower the value of the score, the more favourable the 40 | position is for black. Knowing that white will try to get the score to be higher 41 | and black will try and get the score to be lower, the AI assumes best play from 42 | either side as it traverses up the search tree and chooses the best move to be 43 | played. A problem that may arise is the number of postions that need to be 44 | evaulated. Even at 3 levels of depth, thousands of positions have to be 45 | evaluatd. 46 | Several methods are used in this program to reduce positions that are searched: 47 | 1. Alpha-beta pruning: As a result of evaluating a position it can be found 48 | that a portion of the search tree can be ignored as no further evaluations can 49 | guarantee better results. This can happen because white and black area against 50 | one another. White plays what is best for it and black plays what is best for it, 51 | so it would make sense for white to ignore any portion of the tree where black 52 | has a clear upperhand that it can choose to play. 53 | 2. Transposition table: Often, two different pathways in a search tree can result 54 | in the same board being evaluated. Instead of evaluating the same board several 55 | times, the program stores a table of values in a dictionary where the keys are 56 | the positions. This way, repeated positions can have their evaluations looked up 57 | fairly quickly, as the board state is hashed. 58 | 3. Opening Book - The opening book is again a dictionary that stores board 59 | positions often seen in the beginning few moves in chess. Appropraite moves that 60 | can be played at such positions is stored in the dictionary. A random move is 61 | selected and played from the list of suggested moves wihtout searching if the AI 62 | finds itself confronting a such a board postion. Note that this opening book was 63 | recorded by myself and so it does not have many positions stored in it. 64 | 65 | In order to traverse the search tree as above, the AI needs to know how to evaluate the 66 | board at any position to decide if white or black has the advantage. My evaluation 67 | function currently looks at three main things when evaluating the board: 68 | a) Material for white and black. Each piece has a value and the more pieces you have, 69 | the better off your position is likely to be. For example, if white has an extra 70 | queen, it has an advantage over black. 71 | b) Piece-square table values - for each piece, there is a table that stores the best 72 | squares that the particular piece should occupy. So if white has a knight at a 73 | good square that controls the centre of the board, whereas black has a knight 74 | at the corner of the board, the situation is evaluated as being more favourable 75 | for white. 76 | c) Reduction in points for doubled pawns, isolated pawns, and blocked pawns. If any 77 | side has a set of pawns with the above features their points are slightly lower 78 | to indicate a slight disadvantage in such a position. 79 | d) A checkmate: a position where this has occured gets a very high point, so that the 80 | AI moves towards this if it can. (or avoids it). 81 | 82 | There are also several ways in which this program may be improved: 83 | 1. Move ordering: Given a certain position and the AI needs to search a few layers 84 | deep from it, somehow pre-sorting each move by ranking them in their likelihood of 85 | being good moves allows for earlier cut-offs to be made by alpha-beta pruning. 86 | 2. Iterative Deepening: Instead of going directly to a given depth when searching, 87 | the A.I. may evaluate the best move at depth 1, then depth 2, then depth 3, etc. 88 | until it reaches the final depth it needed to calculate at depth n. The reason for 89 | this is that it may be mathematically shown that this does not dignificantly increase 90 | computation and allows the A.I. to make its best move if it needs to abide by a 91 | time limit. 92 | 3. Better data structure - I believe the structure I have used to keep the state of 93 | the board (list of a list) may be slowing down accessing its elements or assigning 94 | its elements. Improvement in efficiency of my code by changing data structures may 95 | potentially improve the speed at which my AI makes its move. 96 | 4. Import of large opening tables: There are databases available online that store 97 | the best moves played by grandmasters at various key opening positions of the chess 98 | game. Although my AI does make use of an opening table that I recorded for it myself, 99 | it is not able to respond to many opening positions using the table since the table 100 | only convers few positions. If an opening table with millions of positions could be 101 | imported to this program, the AI's moves would improve in the beginning. It would also 102 | give it more variety in terms of the move it plays. Furthermore, using good openings 103 | allows the AI to make the best moves in the field it is best at: middle game tactics. 104 | 5. Better evaluation of positions - The current features evaluated by the evaluation 105 | function when judging a positoin to give it a score allows for good opening games and 106 | tactics that often allow it to gain advantage over the opponents that I have tested it 107 | against. However, there are many aspects of playing good chess that it does not 108 | consider: like having good mobility of your pieces (eg a trapped bishop should be bad 109 | for the AI but it doesn't know that). Other aspects include king safety, pawn structure, 110 | etc. It could also use different evaluation for each game phase. For example, a pawn is 111 | not worth much at the opening phase of the game but in the endgame it is very important 112 | and so should be evaulated as a valuable piece. 113 | 6. Endgame tables - As good as my AI may be in middle games, given a queen and a king to 114 | attempt checkmate against a lone king, it would be unlikely for it to succeed. This is 115 | because such checkmates, despite being simple, require a large number of combination of 116 | moves to occur, the depth of which my AI would not be able to see. So endgame table allows 117 | it to know (for a very large number of endgame positions) the best move to play in order 118 | to attempt a win or a draw (or try its best to avoid a loss). 119 | 120 | 121 | Note about coordinates: 122 | Normally, algebraic notation is used to specify a box on a chess board. In this 123 | program, coordinates will be index referecnes to the 2_D array that stores the 124 | state of the board. Thus, e4 in algebraic notation would be expressed as (4,4) 125 | in this program. 126 | 127 | 128 | Note: This program was written and run on Python 2 on a Windows computer. While I have recently started trying to improve cross-platform compatability, there seems to be issues sometimes with running A.I. on Mac OS. 129 | Furthermore, the program was written for a lower-resolution screen. As a result, the transitions may appear slow on a high-resolution screen. This could be changed by changing relevant parameters on the code. 130 | --------------------------------------------------------------------------------