0% found this document useful (0 votes)
40 views62 pages

PROJECT REPORT On Chess Development

The document describes a chess game development project done by two students. It provides background on chess, including its history and rules. It discusses the chess board setup, piece movements, capturing, checks, checkmates and special moves like castling.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views62 pages

PROJECT REPORT On Chess Development

The document describes a chess game development project done by two students. It provides background on chess, including its history and rules. It discusses the chess board setup, piece movements, capturing, checks, checkmates and special moves like castling.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

AKS University Satna Department of computer science

` PROJECT REPORT

“Chess game development with python”

Submitted To:
AKS University, Satna
IN PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE
BACHELORS OF THE COMPUTER APPLICATION OF
COMPUTER SCIENCE AND ENGINEERING by

Aditya Shukla(B21555R10195014)
Aakash Biswas(B2155R10195033)

Under the Supervision of


MR. Chandra Shekhar Gautam

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Introduction :

Chess, one of the oldest and most popular board games, played by two opponents
on a checkered board with specially designed pieces of contrasting colours,
commonly white and black. White moves first, after which the players alternate
turns in accordance with fixed rules, each player attempting to force the opponent’s
principal piece, the King, into checkmate—a position where it is unable to avoid
capture.

Chess first appeared in India about the 6th century AD and by the 10th century had
spread from Asia to the Middle East and Europe. Since at least the 15th century,
chess has been known as the “royal game” because of its popularity among the
nobility. Rules and set design slowly evolved until both reached today’s standard
in the early 19th century. Once an intellectual diversion favoured by the upper
classes, chess went through an explosive growth in interest during the 20th century
as professional and state-sponsored players competed for an officially recognized
world championship title and increasingly lucrative tournament prizes. Organized
chess tournaments, postal correspondence games, and Internet chess now attract
men, women, and children around the world.

Chess is played on a board of 64 squares arranged in eight vertical rows called files
and eight horizontal rows called ranks. These squares alternate between two
colours: one light, such as white, beige, or yellow; and the other dark, such as black
or green. The board is set between the two opponents so that each player has a
light-coloured square at the right-hand corner.

During the game, the two opponents take turns to move one of their pieces to a
different square of the board. One player ('White') has pieces of a light colour; the
other player ('Black') has pieces of a dark colour. There are rules about how pieces
move, and about taking the opponent's pieces off the board. The player with white
pieces always makes the first move. Because of this, White has a small advantage,
and wins more often than Black in tournament games.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

History :

Most historians agree that the game of chess was first played in
northern India during the Gupta Empire in the 6th century AD. This early type of
chess was known as Chaturanga, a Sanskrit word for the military. The Gupta
chess pieces were divided, like their military, into
the infantry, cavalry, elephants, and chariots. Over time, these pieces became the
pawn, knight, bishop, and rook. The English words chess and check both come
from the Persian word shah meaning king.
The earliest written evidence of chess is found in three romances (epic stories)
written in Sassanid Persia around 600AD. The game was known as chat
rang or Shatranj. When Persia was taken over by Muslims (633–644) the game
spread to all parts of the Muslim world. Muslim traders carried the game
to Russia and Western Europe. By the year 1000, it had spread all across Europe.
In the 13th century, a Spanish manuscript called Libro de los Ju egos described
the games of Shatranj (chess), backgammon, and dice.
The game changed greatly between about 1470 to 1495. The rules of the older
game were changed in the West so that some pieces (queen, bishop) had more
scope, piece development was faster, and the game was more exciting. The new
game formed the basis of modern international chess. Chess historians consider
this to be the most important change since the game's invention.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Rules:
The Rules of Chess are governed by the world chess federation which is known by
The Initials FIDE meaning federation Internationale des Échecs. The rules are in
the section Laws of Chess of the FIDE Handbook. FIDE also give rules and
guidelines for chess tournaments.

Setup:
Chess is played on a square board divided into eight rows of squares
called ranks and eight columns called files, with a dark square in each player's
lower left corner. There are 64 squares on a chess board. The colours of the squares
are laid out in a checker (chequer) pattern with light and dark squares. To make
speaking and writing about chess easy, each square has a name. Rank are numbered
from 1 to 8, and each file is lettered from a to h. The letter assigned to a file comes
before the number.
its ownable, such as g1 or f5. The pieces are in white and black sets. The players
are called White and Black, and at the start of a game each player has 16 pieces.
The 16 pieces are one king, one queen, two rooks, two bishops, two knights and
eight pawns.

Movements:
Definitions: vertical lines are files; horizontal lines are ranks; lines at 45°
are diagonals. Each piece has its own way of moving around the board.
The X marks the squares where the piece can move.

• The knight is the only piece that can jump over another piece.
• No piece may move to a square occupied by a piece of the same colour.
• All pieces capture the same way they move, except pawns.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

• The king (K for short) can move one square in any direction. The king
may not move to any square where it is threatened by an opposing piece.
However, the king can move to a square that is occupied by an
opponent's piece and capture the piece, taking it off the board.
• The queen (Q) can move any distance in any direction on the ranks, files
and diagonals.
• The rooks (R) move any distance on the ranks or files
• The bishops (B) move diagonally on the board. Since a bishop can only
move diagonally, it will always be on the same colour square.
• The knights (Kt or N) move in an "L" shape. Each move must be either
two squares along a rank and one square along a file, or two squares
along a file and one square along a rank. It is the only piece that can
jump over other pieces. Like the other pieces, it captures an opposing
piece by landing on its square.
• The pawns can only move up the board. On its first move a pawn may
move either one or two squares forward. A pawn captures one square
diagonally, not as it moves: see white circles on its diagram. In some
situations, pawns can capture opponent's pawns in a special way
called en passant, which means in passing in French (see below).

Capturing:
Most pieces capture as they move. If a piece lands on an opponent's piece, the
opposing piece is taken off the board. There are three special cases:

1. The king cannot be taken (see check and checkmate).


2. No piece can be taken while castling (see below).
3. Pawns take one square diagonally.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Check and checkmate:


If a move that attacks the opposing king is made, the king is said to be 'in check'.
The player whose king is in check must make a move that escapes the check. A
player can't move into check. The options when a player is in check are moving
the king, capturing the threatening piece, or moving another piece between the
threatening piece and the king.
To win the game one player must checkmate the other player. Checkmate
happens when the other player's king is in check and there is no way to get out of
check the word checkmate is often shorted to "mate". Most games end with one
of the players resigning (giving up) when their position is so bad that defeat
seems inevitable.

Special moves:

Castling-:
Once in every game, each king can make a special move, known as castling.
When the king castles, it moves two squares to the left or right. When this
happens, the rook is moved to stand on the opposite side of the King. Castling is
only allowed if all of these rules are kept:

• Neither piece doing the castling may have been moved during the game.
• There must be no pieces between the squares the king and the rook.
• The king may not be currently in check. The king can't pass through any
square attacked by the opponent as well. As with any move, castling is
not allowed if it would place the king in check.[4]

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

En passant-:
En passant ('in passing' in French) is a special capture. It is only available when a
pawn moves forward two squares past an opposing pawn on an adjacent file. The
opposing pawn must be on the 5th rank from its own side. Then the opponent's
pawn can capture the double-mover as if it had only moved one square forward.
This option is open on the next move only.
For example, if the black pawn has just moved up two squares from g7 to g5,
then the white pawn on f5 can take it by en passant on g6. The en passant rule
was developed when pawns were allowed to make their double move. The rule
made it more difficult for players to avoid pawn exchanges and blockade the
position. It kept the game more open.

Promotion-:
When a pawn moves to its eighth rank, it must be changed for a piece: a queen,
rook, bishop, or knight of the same colour (player's choice). Normally, the pawn
is queened, but in some cases another piece is chosen to get an advantage. This is
called 'under-promotion'.

Ways a game may end

Wins-:

• Checkmate. When a king is in check, and cannot get out of it.


• Resignation. A player may resign at any time, usually because their
position is hopeless. A losing player is able to resign by placing their
king on its side on the chessboard.
• Out of time. If player's clock time is over (exceeding the time control).
Strictly speaking, this is not part of the rules of the game, but part of the
rules of tournament and match chess where chess clocks are used.
• Forfeit: A player who cheats, doesn't follow the rules, or doesn't follow
the rules of conduct for a tournament can be forfeited. Sometimes, both
players are forfeited.[

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Draws-:

• Draw agreed. A game may end in a draw at any time if one player
offers a draw and the other accepts.
• Insufficient material or dead position. A position where no series of
legal moves could lead to a mate (example: K+B vs K). The game is
drawn.
• Stalemate. If a player cannot make a move, and the player's king is not
in check, this is also a draw. This kind of draw is called a stalemate, and
is rare.
• 50-move rule. A game will also end in a draw if no piece is captured
and no pawn has moved after fifty moves. This is called the fifty-move
rule, and happens late in the game.
• Threefold repetition. If the exactly same position is repeated three
times during a game with the same player to move each time, the player
next to move may claim a draw. The game is now drawn. This is called
a draw by threefold repetition.

Competition rules-:
The FIDE rules for competitive chess include all the rules above, as well as
several others.

Touch and move law-:


If a player wishes to adjust a piece on the board, they must first say "J'adoube" (I
adjust) or the equivalent. Apart from that, if a piece is touched it must be moved
if possible. This is the 'touch and move' law. If no legal move is possible with the
touched piece, the player must make a legal move with another piece. When a
player's hand leaves a piece after moving it then the move is over and may not be
changed (if the move was legal).
There are a few famous cases where players appeared to break this rule without
being punished. The most famous example was by the then World
Champion Garry Kasparov against Judit Polgar in a top-class tournament.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Chess clocks-:
Competitive games of chess must be played with special chess clocks which time
a player only when it is their turn to move. After moving, the player presses a
button on the clock, which stops the player's clock and starts the opponent's
clock. Usually the clocks are mechanical, but some are electronic. Electronic
clocks can be set to various programs, and they can count moves made.

Stages of a game
A game is divided into three stages: the opening, the middlegame, and the
endgame.

Opening-:
The first moves of a chess game are called the opening.[26][27] A chess
opening is a name given to a series of opening moves. Recognized
patterns of opening moves are openings and have been given names
such as the Ruy Lopez or Sicilian defence. They are listed in reference
works such as the Encyclopaedia of Chess Openings. There
are dozens of different openings. They range from gambits, where
material, such as pawns are offered for fast development (e.g. the King's
Gambit), to slower openings, which lead to a manoeuvring type of game
(e.g. the Réti opening). In some opening lines, the sequence thought best
for both sides has been worked out to 20–30 moves; most players avoid
such lines.[28] Expert players study openings throughout their chess
career, as opening theory keeps on developing.
The basic aims of the opening phase are:

• Development: to place (develop) the pieces (mostly bishops and


knights) on useful squares where they will have the most powerful
impact on the game
• Control of the centre: the centre is the most important part of the
board. The player who controls the centre can move their pieces
around freely. The opponent, on the other hand, will find their
pieces cramped, and difficult to move about.
• King safety: keeping the king safe from danger. Castling (see
section above) can often do this.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

• Pawn structure: pawns can be used to control the centre. Players


try to avoid making pawn weaknesses such
as isolated, doubled or backward pawns, and pawn islands – and
to force such weaknesses in the opponent's position.
White, by virtue of the first move, begins the game with a better chance of
winning. Black normally tries to equalize or to get counterplay during the
game.

Middlegame-:
The middlegame is the part of the game where most pieces have been developed.
It is where most games are won and lost. Many games will end in resignation
before the endgame takes place.
A middlegame position has a structure. That structure is determined by the
opening. The simplest way to learn the middlegame is to select an opening and
learn it well (see examples in English Opening and French Defence).
These are some things to look for when analysing a middlegame position:

• Material: changes in the balance of material are critical. To lose a piece


for nothing is enough to lose a game. If the players are evenly matched,
then a rough material balance of pieces is normal. Material balance is
often quite static: it does not change for many moves.
• Development: the opening may have left one player with a lead in
development. That player has the initiative, and may attack before the
opponent can get his pieces out. It is a temporary asset; if a lead in
development is not used effectively, it will disappear.
• The centre: in the centre pieces have their greatest effect, and some
(such as the knight) attack more squares in the centre than at the sides.
The player who controls the centre will almost always have the
advantage.
• Mobility: a position is mobile if the pieces can get to their ideal squares.
Almost all middle game positions have some limitations to mobility.
Look for open files for the rooks, and open diagonals for the bishops.
Knights are best placed on outposts, where they cannot easily be
dislodged.
• King safety: ideally, the king should be castled and kept behind a screen
of pawns. If a king is weak, it may targeted for an attack by the
opponent.
• Pawns: they provide the skeleton of a position. They move slowly, and
may become blocked for many moves. Everything takes place around
the pawns. Different openings produce different pawn structures. In this
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

way, openings influence the whole game (François-André Danican


Philidor: "Pawns are the soul of chess").

Endgame-:
The endgame is the part of the game when there are few pieces left on the board.
There are three main strategic differences between earlier parts of the game and
the endgame:

• Pawns: during the endgame, pawns become decisive in the result of a


game. In the endgame, both players try to promote their pawns by
advancing them to the first or last ranks, depending on which side is
advancing. When a pawn reaches the end of the board, it can promote to
a queen; this action is called queening. It can also promote to a rook,
knight, or bishop, called underpromotion, which may be favourable
under certain circumstances.
• Kings: becomes a strong piece in the endgame. The king can be brought
towards the centre of the board. There, it can support its own pawns,
attack the opponent's pawns, and oppose the opponent's king.
• Draws: in the endgame, a game may be drawn because there are too few
pieces on the board to allow a player to win.
Endgame positions are easier to analyse than middlegames, as there are fewer
pieces on the board. Many endgame positions can be won by force. A drawn
endgame is one that is legally drawn (checkmate is impossible), or drawn by
chess experience (drawn with best play by both sides). All endgames in master
chess revolve around the borderline between winning and drawing. Generally,
once a 'textbook' drawn position is reached, the players will agree a draw.
Endgames can be studied according to the types of pieces that remain on the
board. For example, king and pawn endgames have only kings and pawns on one
or both sides, and the task of the stronger side is to promote one of the pawns.
Other endings are studied according to the pieces on board other than kings, e.g.
rook and pawn versus rook endgame

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Chess and computers


There are two types of chess programs. One is to play against you; the
other is to help you become a better player by learning more. The two
types can be made to work together, though they have different functions.

Chess engines-:
Chess engines are computer systems that can play chess games against human
opponents. Quite a number have been devised; they can play at master level,
though their processes are quite different from a human being.[9]p87
Every year brings new advances, which if listed here would soon be out of date.
Best advice is to go to English Wikipedia, which keeps an up-to-date chart of the
leading software:

Chess databases-:
Chess databases give access to the recorded history of master chess
games. There are two components: software, which lets one search and
organise the database material, and the actual database. There are
usually over a million games in a given database.
In practice, databases are used for two purposes. First, for a player to
train his/her ability at specific openings. Second, to look up specific
opponents to see what they play, and prepare against them beforehand.
The existence of chess databases is one of the reasons players can
achieve mastery at an young age.

ChessBase-:

ChessBase is the biggest database, and widely used by masters.


Although it can be used online, most users download the software and
data onto their computer. If that computer happens to be a laptop, then
they might take the laptop to tournaments to help prepare for games.
Players cannot use computers or any other aid during games, so much of
the preparation goes on before a game. ChessBase has to be purchased,
and it is not cheap.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

New in Chess
This is a Dutch magazine for advanced players, which runs an online database
called NicBase as part of its services. NicBase is free, and has over a million
games.
Chess games
Chessgames.com runs an online database of games. It is mostly free; full access
to all its facilities costs a subscription. It has over half a million games on its
database.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

pre-1700 :
• 1475: Francesc de Castellví vs. Narcís de Vinyoles, Valencia 1475. The
first documented chess game played with the modern queen and bishop
moves; the moves were described in the poem Scachs d'amor.
• 1623: Greco–NN, London 1623. Gioachino Greco mates on the eighth
move with a queen sacrifice.
18th century :
• 1788: Thomas Bowdler vs Henry Seymour Conway, London. Thomas
Bowdler offers the first example of a famous double rook sacrifice.
• 1790: Andrew Smith vs François André Philidor, London. François-
André Danican Philidor, who was quoted as saying "Pawns are the soul
of chess", demonstrates the power of a superior pawn formation.
19th century :
• 1834: Louis Charles Mahe De La Bourdonnais vs Alexander
McDonnell, 50th Match Game, London. Reuben Fine in The World's
Great Chess Games describes it as the first great immortal game of
chess. Alexander McDonnell sacrifices his queen for two minor pieces.
• 1834: La Bourdonnais–McDonnell, 62nd Match Game, London.
Perhaps the most famous win of the match (considered an
unofficial world championship), Louis La Bourdonnais shows how a
rolling pawn mass can overwhelm all of his opponent's major pieces,
winning thereby against Alexander McDonnell.
• 1843: Pierre de Saint Amant vs Howard Staunton, 5th Match Game,
Paris. Pierre Charles Fournier de Saint-Amant resigns in this unofficial
world championship match game with Howard Staunton, in which
Staunton remarked, "The latter portion of this game is conducted with
remarkable skill by both parties."
• 1844: Alexander Hoffmann vs Alexander Petrov, Warsaw. Alexander
Petrov wins with a queen sacrifice and a king hunt, in a game known as
"Petrov's Immortal", against Alexander Hoffmann.
• 1851: Adolf Anderssen vs Lionel Kieseritzky, London. "The Immortal
Game" Lionel Kieseritzky neglects his development and Adolf
Anderssen sacrifices his queen and both rooks for a win.
• 1852: Adolf Anderssen vs Jean Dufresne, Berlin. "The Evergreen
Game". Adolf Anderssen mates with what Savielly Tartakower termed
"[a] combination second to none in the literature of the game."

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

• 1857: Louis Paulsen vs Paul Morphy, New York. Paul Morphy gains an
advantage in development and transforms it into a powerful kingside
attack with a queen sacrifice.
• 1858: Paul Morphy vs Duke of Brunswick & Count Isouard, Paris.
"The Opera Game" Morphy shows the virtue of quick development and
wins by sacrificing much material, mating on the 17th move with his last
two pieces.
• 1862: Steinitz–Mongredien, London. Wilhelm Steinitz won the
tournament's brilliancy prize for this game.
• 1872: Carl Hamppe vs Philipp Meitner, Vienna. The "Immortal Draw"
between Carl Hamppe and Philipp Meitner, involving a queen
sacrifice.[14]
• 1874: Victor Knorre vs Mikhail Chigorin, St. Petersburg. White's
premature castling on the king side combined with an ineffective pin
allows Mikhail Chigorin to strike back with a violent counterattack
culminating in a brilliant queen sacrifice and subsequent checkmate.
• 1883: Johannes Zukertort vs Joseph Henry Blackburne, London
• 1889: Emanuel Lasker vs Johann Hermann Bauer, Amsterdam.
This game between Emanuel Lasker and Johann Hermann Bauer was the
first famous example of the double bishop sacrifice.
• 1895: Harry Nelson Pillsbury vs Siegbert Tarrasch, Hastings. Harry
Nelson Pillsbury's kingside attack breaks through by a single tempo
against Black's queenside play, against Siegbert Tarrasch, then one of the
strongest players of the world.
• 1895: Steinitz–von Bardeleben, Hastings. This game is famous for its
ten-move mating combination in the final position, which Steinitz
demonstrated after the game.[19] The peculiar circumstance of the
conclusion of this game has been subject of scrutiny.
• 1895: Harry Nelson Pillsbury vs Isidor Gunsberg, Hastings. In the final
round of this prestigious tournament, Pillsbury secures overall victory by
triumphing in an instructive endgame.
• 1896: Harry Nelson Pillsbury vs Emanuel Lasker, Saint
Petersburg. Emanuel Lasker won the brilliancy prize for this game by
exposing Pillsbury's king with the sacrifice of both rooks on the same
square.
1900–1949 :
• 1904: Emanuel Lasker vs William Ewart Napier, Cambridge Springs.
Both players show great ingenuity. After a complicated web of tactics,
Lasker simplifies into a winning endgame.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

• 1907: Rotlewi–Rubinstein, Lodz. Akiba Rubinstein wins this game with


one of the most famous combinations ever played.
• 1909: Akiba Rubinstein vs Emanuel Lasker, Saint Petersburg. Akiba
Rubinstein's brilliant play culminates in 18.Qc1!! subsequently forcing
Emanuel Lasker to enter a rook endgame down a pawn which
Rubinstein wins in masterly fashion.
• 1912: Levitsky–Marshall, Breslau. The final move of Frank James
Marshall (matched against Stefan Levitsky) places his queen en prise in
three different ways. The spectators are said to have showered the board
with gold coins.
• 1912: Edward Lasker–Thomas, London. With a queen sacrifice, Edward
Lasker exposes Black's king and with a series of checks drives it all the
way to the other side of the board before checkmating with an advance
of his king.
• 1914: Emanuel Lasker vs Jose Raul Capablanca, St Petersburg. Lasker
defeats José Raúl Capablanca in a positional game where his winning
strategy seemed to flow right out of the opening to the end. Capablanca,
himself renowned as a master of simple positions, was sufficiently
rattled to lose in the next round as well, handing the tournament victory
to Lasker.
• 1918: Jose Raul Capablanca vs Frank Marshall, New York. In the main
line Ruy Lopez, Frank Marshall surprises José Raúl Capablanca with a
bold pawn sacrifice. Capablanca accepts the challenge fully aware of the
fierce attack he is about to face.
• 1920: Edwin Ziegler Adams vs Carlos Torre Repetto, New Orleans.
Likely composed by Carlos Torre as a tribute to his benefactor E. Z.
Adams, this game features the most famous back-rank mate combination
in chess literature, involving six consecutive offers of the queen.[31]
• 1922: Alekhine–Bogoljubov, Pistyan. This game is referred in the
famous novella The Royal Game by Stefan Zweig, which inspired
multiple movies, theater plays and musical performances. In the story
the position after 38. d6 is being reproduced in a game between the
fictional world chess champion and a group of outmatched amateur
players who are on the verge of promoting their c-pawn, when an
unknown spectator frantically intervenes and explains how white will
beat them in 9–10 moves after 38... c1Q 39. Bxc1 Nxc1 40. d7. He
proposes 38... Kh7 instead, correctly predicting that 39. h4 will follow
and after 39... Rc4 he maneuvers the game for 7–8 more moves until the
world champion settles for a draw.
• 1922: Efim Bogoljubov vs Alexander Alekhine, Hastings. Irving
Chernev called this the greatest game of chess ever played, adding:
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

"Alekhine's subtle strategy involves manoeuvres which encompass the


entire chessboard as a battlefield. There are exciting plots and
counterplots. There are fascinating combinations and brilliant sacrifices
of Queens and Rooks. There are two remarkable promotions of Pawns
and a third in the offing, before White decides to capitulate." (The Chess
Companion, Chernev, Faber & Faber Ltd, 1970).
• 1923: Sämisch–Nimzowitsch, Copenhagen "The Immortal Zugzwang
Game".
• 1924: Richard Réti–José Raúl Capablanca, New York. The game that
ended Capablanca's eight-year run without a single loss in tournament
play.
• 1924: Jose Raul Capablanca vs Savielly Tartakower, New York. One of
the most famous and instructive endgames ever played. Capablanca
sacrifices two pawns with check to support his passed pawn.[36]
• 1925: Richard Reti vs Alexander Alekhine, Baden-Baden. Alekhine
initiates a stunning combination and foresees the final position resulting
more than 15 moves later.
• 1929: Glucksberg vs Miguel Najdorf, Warsaw. In this game, dubbed the
'Polish Immortal', Black sacrifices all four minor pieces for victory.[38]
• circa 1933: Einstein versus Oppenheimer, recorded game in playbooks,
said to have been played between physicists Albert Einstein (or his
son Hans Albert Einstein) and J. Robert Oppenheimer. No conclusive
evidence supports the historical accuracy of this game.
• 1934: Canal–Unknown, Budapest. "The Peruvian Immortal", sees
Peruvian master Esteban Canal demolish his amateur opponent with the
sacrifice of two rooks and queen.
• 1935: Max Euwe vs Alexander Alekhine, 26th Match Game, Zandvoort.
This decisive game from the 1935 match for the world championship
was dubbed 'The Pearl of Zandvoort' by Tartakower.
• 1938: Mikhail Botvinnik vs Jose Raul Capablanca, Rotterdam. In this
game from the AVRO 1938 tournament, Botvinnik obtains a strong
initiative against Capablanca and brings the victory home with a long
combination.
• 1938: Frank Parr vs George Wheatcroft, London. Irving Chernev and
Fred Reinfeld described this as "one of the greatest combinative games
on record!" (Fireside Book Of Chess, Simon & Schuster, 1949, pp. 392–
93)
• 1943: B Molinari vs Luis Roux Cabral, Montevideo. This game from the
1943 Uruguayan Chess Championship, dubbed the "Uruguayan
Immortal", sees Luis Roux Cabral sacrifice the exchange twice,
followed by sacrifices of two minor pieces. After 33 moves, all three of
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

his remaining pieces are en prise—and his opponent cannot stop


checkmate.
• 1946: Gusev–Auerbach, Chelyabinsk. Not to be confused with the
late centenarian grandmaster and theorician Yuri Averbakh, this game,
dubbed "Gusev's Immortal", was a game contested between the
relatively obscure players Yuri Gusev and E Auerbach in an equally
obscure minor tournament.[45] It involved a sound positional queen
sacrifice from Gusev, which was blind to chess engines for 74 years,
requiring Stockfish 11 six hours and 48 minutes at Depth 73/49 to
recommend the queen sacrifice in 2020; Gusev went on to win. The
game has been studied extensively online. National Master Sam
Copeland ranked it the second-best game of the
1940s.[50] Grandmaster Simon Williams termed the queen sacrifice in
Gusev's Immortal one of the most beautiful ideas that he had ever seen.
1950s :
• 1953: Geller–Euwe, Zurich. Geller's attack seems to be sweeping Euwe
off the board but the former World Champion has everything under
control, uncorking an amazing sacrifice on move 22 to begin a
counterattack that wins the game in only four more moves.[52]
• 1954: Mikhail Botvinnik vs Vasily Smyslov, 14th Match Game,
Moscow. Smyslov sacrifices his queen for three minor pieces and
coordinates them superbly to force Botvinnik's capitulation.[53]
• 1956: Donald Byrne vs Bobby Fischer, New York, "Game of the
Century". Donald Byrne makes a seemingly minor mistake on move 11,
losing a tempo by moving the same piece twice. Bobby Fischer uses
accurate sacrificial play, culminating in a queen sacrifice. After the
maneuver, Fischer has a winning material advantage – a rook and two
bishops for a queen, and coordinates them to force checkmate. Fischer
was 13 years old; his opponent was 26.[54]
• 1957: Bogdan Sliwa vs David Bronstein, Gotha. "The Immortal losing
game" between Bogdan Sliwa and David Bronstein. Black has a lost
game but sets some elegant traps in attempting to snatch victory from
the jaws of defeat.[55]
• 1958: Lev Polugaevsky vs Rashid Nezhmetdinov, Sochi. In one of the
most celebrated games of all time, Nezhmetdinov sacrifices his queen on
move 24, and goes on to win the game with a king hunt.[56]
• 1959: Mikhail Tal vs Vasily Smyslov, Bled. Tal initiates complications
early in this game and obtains a strong attack. Smyslov defends well, but
eventually stumbles with one erroneous move and Tal delivers the
winning tactical blow.[57]
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

• 1959: Bobby Fischer vs Tigran Petrosian, Zagreb. The only prominent


game in which four queens were on board for seven moves. Match ends
with draw by agreement.[58]
1960s :
• 1960: Boris Spassky vs David Bronstein, Leningrad, "The Blue Bird
Game". Boris Spassky plays the King's Gambit and defeats David
Bronstein with a sacrificial attack.[59]
• 1960: Mikhail Tal vs Mikhail Botvinnik, 1st Match Game, Moscow.
Tal's critics said his daring, complicated style couldn't possibly work
against the ironclad logic of the Father of Soviet Chess, but it did and
Tal became the youngest World Champion ever.[60]
• 1961: Milunka Lazarevic vs Nona Gaprindashvili, Candidates
Tournament, Vrnjacka Banja. On her way to a 16-year reign as Women's
World Champion, the future queen of women's chess constructs a mating
net with, appropriately, her king and queen.[61]
• 1962: Eduard Gufeld vs Ljubomir Kavalek, Marianske Lazne. Kavalek
sacrifices a piece, then one exchange, then the other exchange to push
his avalanche of pawns down the board. By the end of the game he has
lost all seven of his pieces but kept all eight of his pawns, which roll
over White's remaining rook.[62]
• 1963: Robert Eugene Byrne vs Bobby Fischer, New York. Fischer
executes a deep sacrificial attack to win in this miniature. Many of the
players in the press room thought Fischer's position was hopeless and
were surprised when they heard Byrne had resigned.[63]
• 1966: Tigran Petrosian vs Boris Spassky, 10th Match Game, Moscow.
Petrosian, the master of the exchange sacrifice, does it twice in one
game with the World Championship on the line.[64]
• 1968: Poole versus HAL 9000. A fictional game from the movie 2001: A
Space Odyssey, based on a tournament game between A. Roesch and W.
Schlage, Hamburg 1910. Astronaut Dr. Frank Poole plays against the
supercomputer HAL 9000. The computer executes a strong sacrificial
attack and wins in 15 moves.
• 1969: Boris Spassky vs Tigran Petrosian, 19th Match Game, Moscow.
Having fought his way to a World Championship rematch with
Petrosian, Boris Spassky wins the match decisively.[65]
1970s :
• 1970: Bent Larsen vs Boris Spassky, Belgrade. Spassky finds immediate
punishment for Larsen's opening experiments, sacrificing a knight and a
rook to create a passed pawn, winning the game in just 17 moves.[66]
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

• 1971: Bruce Harper vs Bob Zuk, Burnaby. The famous "Tomb Game"
(Bruce Harper vs Bob Zuk) sees Black exploit two pins to drive his
opponent's pieces into a corner and toward a position where White's only
legal move will help Black to checkmate him.[67]
• 1972: Bobby Fischer vs Boris Spassky, 6th Match Game,
Reykjavik. Game 6 of the highly publicized World Championship
Match. Bobby Fischer surprises by opening with 1.c4 instead of his
favorite 1.e4. Boris Spassky joined the audience in applauding Fischer's
win and called it the best game of the World Chess Championship 1972.
• 1972: Boris Spassky vs Bobby Fischer, 11th Match Game, Reykjavik.
In Game 11 of the highly publicized World Championship Match, Boris
Spassky destroys Bobby Fischer's Najdorf, giving Fischer his only loss
in the poisoned pawn variation.
• 1972: Boris Spassky vs Bobby Fischer, 13th Match Game,
Reykjavik. Game 13 of the highly publicized World Championship
Match. Bobby Fischer wins this complex contest, defeating Boris
Spassky.
• 1973: David Bronstein vs Ljubomir Ljubojevic, Petropolis Interzonal.
Bronstein, who played a match for the World Championship before his
grandmaster opponent could walk, turns back the clock, sacrifices both
rooks and wins through sheer sorcery.
• 1974: Anatoly Karpov vs Boris Spassky, 9th Match Game, Leningrad.
Former World Champion Boris Spassky can't cope with future World
Champion Anatoly Karpov's subtle, seemingly effortless positional
mastery.
• 1978: Liu Wenzhe vs Jan Hein Donner, Buenos Aires. "The Chinese
Immortal"; at China's first olympiad, the little known Liu Wenzhe
defeats the experienced Dutch grandmaster Jan Hein Donner in 20
moves with a spectacular king's side attack.
1980s :
• 1981: Garry Kasparov vs Viktor Gavrikov, USSR Championship,
Frunze. One of Garry Kasparov's dynamic, attacking wins from his first
Soviet Championship victory at age 18 that heralded the arrival of a new
contender for the World Chess Championship.
• 1984: Lajos Portisch vs Jozsef Pinter, Hungarian Championship,
Budapest. Jozsef Pinter plays the game of his life against his famous
opponent, sacrificing a piece in a queenless middlegame to draw Lajos
Portisch's king into a deadly crossfire.
• 1985: Anatoly Karpov vs Garry Kasparov, 16th Match Game, Moscow.
Garry Kasparov employs a daring gambit and obtains a dominating
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

position for his knight, stifling Anatoly Karpov's forces and finishing off
with a mating attack.
• 1986: Garry Kasparov vs Anatoly Karpov, 16th Match Game,
Leningrad. The most spectacular game of their third World
Championship match hangs in the balance until Garry Kasparov's
diabolical 37th move blows Karpov's defence away.
• 1987: Garry Kasparov vs Anatoly Karpov, 24th Match Game, Seville.
Trailing by a point before the final game of their fourth World
Championship match, Garry Kasparov surprises Karpov by beginning
quietly in Anatoly Karpov's own style. With Karpov running low on
time, Kasparov ratchets up the tension by sacrificing a pawn for an
attack. Karpov fails to find the best defence and is finally forced to
resign, leaving Kasparov the champion for another three years.
• 1989: Jeroen Piket vs Garry Kasparov, Tilburg. A typically devastating
performance by Garry Kasparov, whose dominance of super-
tournaments in 1989 increased his rating to 2800, the first to reach that
number.
1990s :
• 1990: Anatoly Karpov vs Garry Kasparov, World Chess Championship,
Lyon, 23rd Match Game. The 5th World Championship match between
the two dominant players of the 1980s ends with Karpov winning the
last decisive game but Kasparov winning the match to remain World
Champion.
• 1991: Vassily Ivanchuk vs Artur Yusupov, Brussels, 9th Match Game.
Yusupov sacrifices his knight in his quest for the attack and breaks
through after Ivanchuk's inaccuracies. In 1996, a jury of grandmasters
and readers, voting in the Chess Informant, chose this game as the best
game played in the years 1966–96.
• 1992: Mikhail Tal vs Joel Lautier, Barcelona. In his final tournament
before his death at age 55, the Magician from Riga produces one last
masterpiece against a Grandmaster from the next generation.[83]
• 1992: Vasyl Ivanchuk vs Viswanathan Anand, Linares, 1st Match Game.
Anand breaks all principles of positional chess by getting doubled
pawns, trading his good bishop only to reveal the deep idea later in the
game, managing to create 2 passed pawns and eventually winning the
game .
• 1993: Nigel Short vs Garry Kasparov, PCA World Championship,
London, 8th Match Game. Although the match was one-sided, the games
were hard fought. In this game Short exposes Kasparov's king with a
shower of sacrifices but can't land the knockout blow.[86]
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

• 1994: Alexey Shirov vs. Judit Polgar, Buenos Aires. The attacking
prowess of the strongest woman chessplayer of all time is on full display
as she rips White's position apart with her pawns and routs his army with
her knights.
• 1995: Roberto Cifuentes Parada vs Vadim Zvjaginsev, Wijk aan Zee.
Black wins with a series of sacrifices that force White's king up to the
6th rank. Known as "The Pearl of Wijk aan Zee".
• 1995: Veselin Topalov vs Vladimir Kramnik, Belgrade. Foreshadowing
their bitter rivalry a decade later, two future World Champions refuse to
draw and throw everything at each other until only one is left standing.
• 1996: Deep Blue versus Kasparov, 1996, Game 1, the first game in
which a chess-playing computer defeated a reigning world
champion using classical time controls.
• 1997: Deep Blue versus Kasparov, 1997, Game 6, the last game of the
1997 rematch. Deep Blue won, making it the first computer to defeat a
world champion in a match.
• 1998: Veselin Topalov vs Alexey Shirov, Linares. Though known for his
attacking play, Alexey Shirov produces "The best move of all time" on
move 47 of a quiet endgame to score a seemingly impossible win.
• 1999: Kasparov–Topalov, Wijk aan Zee 1999. "Kasparov's Immortal"
features a rook sacrifice with a sacrificial combination lasting over 15
moves. One of the most commented chess games ever, with extensive
press coverage.

• 1999: Kasparov versus the World, in which Garry Kasparov, the


reigning world champion, faced a group of players in consultation, who
decided moves by vote. This group included 50,000 individuals from
more than 75 countries. Kasparov won.
2000s :
• 2000: Kasparov–Kramnik, Classical World Chess Championship 2000,
3rd Match Game, London. Vladimir Kramnik revives the Berlin Defense
to the Ruy Lopez (which had fallen out of favor), in which the queens
are exchanged on move 8. The queenless endgame is difficult for
Kramnik to defend but limits Garry Kasparov's options, and the game
ends in draw by agreement.
• 2004: Vladimir Kramnik vs Peter Leko, Classical World Chess
Championship 2004, 14th Match Game, Brissago. Needing only a draw
to win the World Championship, Peter Leko plays too passively and
pays the price.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

• 2005: Viswanathan Anand vs Veselin Topalov, Sofia. Amazing in its


complexity, this game finally ended in a hard-fought draw and was
called "23rd-century chess" by Kramnik.
• 2006: Sergey Karjakin vs Viswanathan Anand, Corus chess tournament,
Round 1, Wijk aan zee. Viswanathan Anand played a brilliant
combination against Sergey Karjakin, beginning with the sacrifice of a
knight followed by sacrifice of a bishop and finally a rook mating with
just a rook and a queen.
• 2006: Vladimir Kramnik vs Veselin Topalov, World Chess
Championship 2006, 16th Match Game, Elista. After 13 years of a
divided World Chess Championship, the reunification match comes
down to a final tiebreak game.
2010s :
• 2013: Anand's Immortal. In this game reigning world
champion Viswanathan Anand exhibits a combination with a rook
sacrifice and two more offered sacrifices to beat Levon Aronian, then
ranked No. 3 in the world. ChessBase wrote that "[it] might surely go
down as the game of the year", and The New York Times described it as
"a game for the ages".
• 2013: Anand–Carlsen, World Championship 2013, Game 9, Chennai.
Two games down with only three to go in the match, Viswanathan
Anand develops a dangerous kingside attack only to make a fatal
blunder on move 28. One game later, Magnus Carlsen becomes the 16th
undisputed World Chess Champion.
• 2015: Wei Yi–Bruzon, Danzhou. In this game, chess prodigy Wei
Yi plays a rook sacrifice that forces Black to take a king walk. Several
quiet moves eventually force Black to concede defeat. This game has
been compared to Kasparov's Immortal and the Game of the Century,
and described as the "21st-century Immortal".
• 2016: Carlsen–Karjakin, World Championship 2016, Game 16, New
York. Magnus Carlsen retains his title with the most beautiful move ever
to end a World Chess Championship match.
• 2017: Bai Jinshi–Ding Liren. Ding Liren creates a stunning tactical
crush of his young compatriot Bai Jinshi in just 32 moves with the black
pieces, sacrificing his queen and culminating in a spectacular king hunt.
• 2019: Alireza Firouzja–Murali Karthikeyan. Karthikeyan sacrifices his
queen on move 9 in a known position for a knight and a bishop against
prodigious Alireza Firouzja, leaving the latter's pieces uncoordinated and
without decent squares.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

2020s :
• 2021: Carlsen versus Nepomniachtchi, World Chess Championship
2021, Game 6. In this game, reigning world champion Magnus
Carlsen (as White) exchanged his queen for two rooks to enter into an
unbalanced endgame—which was drawn, according to the endgame
tablebases, after only seven pieces remained on the board—but
challenger Ian Nepomniachtchi (as Black) committed a decisive mistake
on move 130 and resigned after Carlsen's 136th move.[112] It was the first
decisive classical game in a World Chess Championship in more than
five years, ending the longest-ever streak of 19 draws in consecutive
World Chess Championship classical games, and the 136-move game
became the longest in the history of the World Chess Championship.[114]

• 2023: Nepomniachtchi–Ding, World Chess Championship 2023, Game


18. In a winner-take-all tiebreak game, Ding Liren avoids a draw with a
risky self-pin on move 46. Both players make errors in the subsequent
play but Nepomniachtchi makes the last one as Ding breaks through to
become the 17th undisputed World Chess Champion

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

What is python programming language?

Python is an interpreted, object-oriented, high-level programming language with


dynamic semantics. Its high-level built in data structures, combined with
dynamic typing and dynamic binding, make it very attractive for Rapid
Application Development, as well as for use as a scripting or glue language to
connect existing components together. Python's simple, easy to learn syntax
emphasizes readability and therefore reduces the cost of program maintenance.
Python supports modules and packages, which encourages program modularity
and code reuse. The Python interpreter and the extensive standard library are
available in source or binary form without charge for all major platforms, and
can be freely distributed.

Often, programmers fall in love with Python because of the increased


productivity it provides. Since there is no compilation step, the edit-test-debug
cycle is incredibly fast. Debugging Python programs is easy: a bug or bad input
will never cause a segmentation fault. Instead, when the interpreter discovers an
error, it raises an exception. When the program doesn't catch the exception, the
interpreter prints a stack trace. A source level debugger allows inspection of local
and global variables, evaluation of arbitrary expressions, setting breakpoints,
stepping through the code a line at a time, and so on. The debugger is written in
Python itself, testifying to Python's introspective power. On the other hand, often
the quickest way to debug a program is to add a few print statements to the
source: the fast edit-test-debug cycle makes this simple approach very effective.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

History of python programming language

The programming language Python was conceived in the late 1980s, and its
implementation was started in December 1989 by Guido van
Rossum at CWI in the Netherlands as a successor to ABC capable of exception
handling and interfacing with the Amoeba operating system. Van Rossum is
Python's principal author, and his continuing central role in deciding the direction
of Python is reflected in the title given to him by the Python
community, Benevolent Dictator for Life (BDFL). (However, Van Rossum
stepped down as leader on July 12, 2018.[6]). Python was named after the BBC
TV show Monty Python's Flying Circus.
Python 2.0 was released on October 16, 2000, with many major new features,
including a cycle-detecting garbage collector (in addition to reference counting)
for memory management and support for Unicode, along with a change to the
development process itself, with a shift to a more transparent and community-
backed process.
Python 3.0, a major, backwards-incompatible release, was released on December
3, 2008[9] after a long period of testing. Many of its major features have also
been backported to the backwards-compatible, though now-unsupported, Python
2.6 and 2.7.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Early history

In February 1991, Van Rossum published the code (labeled version 0.9.0) to
alt.sources.[11][12] Already present at this stage in development were classes with
inheritance, exception handling, functions, and the
core datatypes of list, dict, str and so on. Also in this initial release was a module
system borrowed from Modula-3; Van Rossum describes the module as "one of
Python's major programming units".[1] Python's exception model also resembles
Modula-3's, with the addition of an else clause.[3] In 1994 comp.lang.python, the
primary discussion forum for Python, was formed, marking a milestone in the
growth of Python's userbase.[1]

Version 1

Python reached version 1.0 in January 1994. The major new features included in
this release were the functional programming
tools lambda, map, filter and reduce. Van Rossum stated that "Python acquired
lambda, reduce(), filter() and map(), courtesy of a Lisp hacker who missed them
and submitted working patches".[13]
The last version released while Van Rossum was at CWI was Python 1.2. In
1995, Van Rossum continued his work on Python at the Corporation for National
Research Initiatives (CNRI) in Reston, Virginia from where he released several
versions.
By version 1.4, Python had acquired several new features. Notable among these
are the Modula-3 inspired keyword arguments (which are also similar
to Common Lisp's keyword arguments) and built-in support for complex
numbers. Also included is a basic form of data hiding by name mangling, though
this is easily bypassed.[14]
During Van Rossum's stay at CNRI, he launched the Computer Programming for
Everybody (CP4E) initiative, intending to make programming more accessible to
more people, with a basic "literacy" in programming languages, similar to the
basic English literacy and mathematics skills required by most employers.
Python served a central role in this: because of its focus on clean syntax, it was
already suitable, and CP4E's goals bore similarities to its predecessor, ABC. The
project was funded by DARPA.[15] As of 2007, the CP4E project is inactive, and
while Python attempts to be easily learnable and not too arcane in its syntax and
semantics, outreach to non-programmers is not an active concern.[16]

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

BeOpen

In 2000, the Python core development team moved to BeOpen.com[17] to form


the BeOpen PythonLabs team.[18][19] CNRI requested that a version 1.6 be
released, summarizing Python's development up to the point at which the
development team left CNRI. Consequently, the release schedules for 1.6 and 2.0
had a significant amount of overlap.[8] Python 2.0 was the only release from
BeOpen.com. After Python 2.0 was released by BeOpen.com, Guido van Rossum
and the other PythonLabs developers joined Digital Creations.
The Python 1.6 release included a new CNRI license that was substantially
longer than the CWI license that had been used for earlier releases. The new
license included a clause stating that the license was governed by the laws of
the State of Virginia. The Free Software Foundation argued that the choice-of-
law clause was incompatible with the GNU General Public License. BeOpen,
CNRI and the FSF negotiated a change to Python's free software license that
would make it GPL-compatible. Python 1.6.1 is essentially the same as Python
1.6, with a few minor bug fixes, and with the new GPL-compatible license.

Version 2

Python 2.0, released October 2000,[8] introduced list comprehensions, a feature


borrowed from the functional programming languages SETL and Haskell.
Python's syntax for this construct is very similar to Haskell's, apart from
Haskell's preference for punctuation characters and Python's preference for
alphabetic keywords. Python 2.0 also introduced a garbage collector capable of
collecting reference cycles.[8]
Python 2.1 was close to Python 1.6.1, as well as Python 2.0. Its license was
renamed Python Software Foundation License. All code, documentation and
specifications added, from the time of Python 2.1's alpha release on, is owned by
the Python Software Foundation (PSF), a non-profit organization formed in
2001, modeled after the Apache Software Foundation.[20] The release included a
change to the language specification to support nested scopes, like
other statically scoped languages.[21] (The feature was turned off by default, and
not required, until Python 2.2.)
Python 2.2 was released in December 2001;[22] a major innovation was the
unification of Python's types (types written in C) and classes (types written in
Python) into one hierarchy. This single unification made Python's object model
purely and consistently object oriented.[23] Also added were generators which
were inspired by Icon.[24]
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Historic Python logos used on Windows (left) and the Macintosh (centre), and
the logo used since version 2.5 (right).
Python 2.5 was released in September 2006 ] and introduced the with statement,
which encloses a code block within a context manager (for example, acquiring
a lock before the block of code is run and releasing the lock afterwards, or
opening a file and then closing it), allowing resource acquisition is
initialization (RAII)-like behavior and replacing a common try/finally idiom.
Python 2.6 was released to coincide with Python 3.0, and included some features
from that release, as well as a "warnings" mode that highlighted the use of
features that were removed in Python 3.0. Similarly, Python 2.7 coincided with
and included features from Python 3.1,] which was released on June 26, 2009.
Parallel 2.x and 3.x releases then ceased, and Python 2.7 was the last release in
the 2.x series. In November 2014, it was announced that Python 2.7 would be
supported until 2020, but users were encouraged to move to Python 3 as soon as
possible. Python 2.7 support ended on January 1, 2020, along with code freeze of
2.7 development branch. A final release, 2.7.18, occurred on April 20, 2020, and
included fixes for critical bugs and release blockers.[31] This marked the end-of-
life of Python 2.

Version 3

Python 3.0 (also called "Python 3000" or "Py3K") was released on December 3,
2008.[9] It was designed to rectify fundamental design flaws in the language – the
changes required could not be implemented while retaining full backwards
compatibility with the 2.x series, which necessitated a new major version
number. The guiding principle of Python 3 was: "reduce feature duplication by
removing old ways of doing things".[33]
Python 3.0 was developed with the same philosophy as in prior versions.
However, as Python had accumulated new and redundant ways to program the
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

same task, Python 3.0 had an emphasis on removing duplicative constructs and
modules, in keeping with the Zen of Python: "There should be one— and
preferably only one —obvious way to do it".
Nonetheless, Python 3.0 remained a multi-paradigm language. Coders could still
follow object-oriented, structured, and functional programming paradigms,
among others, but within such broad choices, the details were intended to be
more obvious in Python 3.0 than they were in Python 2.x.

Compatibility
Python 3.0 broke backward compatibility, and much Python 2 code does not run
unmodified on Python 3.[34] Python's dynamic typing combined with the plans to
change the semantics of certain methods of dictionaries, for example, made
perfect mechanical translation from Python 2.x to Python 3.0 very difficult. A
tool called "2to3" does the parts of translation that can be done automatically. At
this, 2to3 appeared to be fairly successful, though an early review noted that
there were aspects of translation that such a tool would never be able to
handle.[35] Prior to the roll-out of Python 3, projects requiring compatibility with
both the 2.x and 3.x series were recommended to have one source (for the 2.x
series), and produce releases for the Python 3.x platform using 2to3. Edits to the
Python 3.x code were discouraged for so long as the code needed to run on
Python 2.x.[10] This is no longer recommended; as of 2012 the preferred approach
was to create a single code base that can run under both Python 2 and 3 using
compatibility modules.

Features :
Some of the major changes included for Python 3.0 were:

• Changing print so that it is a built-in function, not a statement. This


made it easier to change a module to use a different print function, as
well as making the syntax more regular. In Python 2.6 and 2.7 print() is
available as a builtin but is masked by the print statement syntax, which
can be disabled by entering from __future__ import print_function at the
top of the file[37]
• Removal of the Python 2 input function, and the renaming of
the raw_input function to input. Python 3's input function behaves like
Python 2's raw_input function, in that the input is always returned as a
string rather than being evaluated as an expression

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

• Moving reduce (but not map or filter) out of the built-in namespace and
into functools (the rationale being code that uses reduce is less readable
than code that uses a for loop and accumulator variable)[38][39]
• Adding support for optional function annotations that can be used
for informal type declarations or other purposes[40]
• Unifying the str/unicode types, representing text, and introducing a
separate immutable bytes type; and a mostly corresponding
mutable bytearray type, both of which represent arrays of bytes[41]
• Removing backward-compatibility features, including old-style classes,
string exceptions, and implicit relative imports
• A change in integer division functionality: in Python 2, integer division
always returns an integer. For example 5 / 2 is 2; whereas in Python 3, 5
/ 2 is 2.5. (In both Python 2 – 2.2 onwards – and Python 3, a separate
operator exists to provide the old behavior: 5 // 2 is 2)
Subsequent releases in the Python 3.x series have included additional, substantial
new features; all ongoing development of the language is done in the 3.x series.

Syntax and semantics


Python is meant to be an easily readable language. Its formatting is visually
uncluttered and often uses English keywords where other languages use
punctuation. Unlike many other languages, it does not use curly brackets to
delimit blocks, and semicolons after statements are allowed but rarely used. It
has fewer syntactic exceptions and special cases than C or Pascal.[92]
Indentation
Python uses whitespace indentation, rather than curly brackets or keywords, to
delimit blocks. An increase in indentation comes after certain statements; a
decrease in indentation signifies the end of the current block.[93] Thus, the
program's visual structure accurately represents its semantic structure.[94] This
feature is sometimes termed the off-side rule. Some other languages use
indentation this way; but in most, indentation has no semantic meaning. The
recommended indent size is four spaces.[95]
Statements and control flow
Python's statements include:

• The assignment statement, using a single equals sign =


• The if statement, which conditionally executes a block of code, along
with else and elif (a contraction of else-if)
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

• The for statement, which iterates over an iterable object, capturing each
element to a local variable for use by the attached block
• The while statement, which executes a block of code as long as its
condition is true
• The try statement, which allows exceptions raised in its attached code
block to be caught and handled by except clauses (or new
syntax except* in Python 3.11 for exception groups[96]); it also ensures
that clean-up code in a finally block is always run regardless of how the
block exits
• The raise statement, used to raise a specified exception or re-raise a
caught exception
• The class statement, which executes a block of code and attaches its
local namespace to a class, for use in object-oriented programming
• The def statement, which defines a function or method
• The with statement, which encloses a code block within a context
manager (for example, acquiring a lock before it is run, then releasing
the lock; or opening and closing a file), allowing resource-acquisition-is-
initialization (RAII)-like behavior and replacing a common try/finally
idiom[97]
• The break statement, which exits a loop
• The continue statement, which skips the rest of the current iteration and
continues with the next
• The del statement, which removes a variable—deleting the reference
from the name to the value, and producing an error if the variable is
referred to before it is redefined
• The pass statement, serving as a NOP, syntactically needed to create an
empty code block
• The assert statement, used in debugging to check for conditions that
should apply
• The yield statement, which returns a value from a generator function
(and also an operator); used to implement coroutines
• The return statement, used to return a value from a function
• The import and from statements, used to import modules whose
functions or variables can be used in the current program
The assignment statement (=) binds a name as a reference to a separate,
dynamically allocated object. Variables may subsequently be rebound at any time
to any object. In Python, a variable name is a generic reference holder without a
fixed data type; however, it always refers to some object with a type. This is
called dynamic typing—in contrast to statically-typed languages, where each
variable may contain only a value of a certain type.
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Python does not support tail call optimization or first-class continuations, and,
according to Van Rossum, it never will. However, better support for coroutine-
like functionality is provided by extending Python's generators. Before 2.5,
generators were lazy iterators; data was passed unidirectionally out of the
generator. From Python 2.5 on, it is possible to pass data back into a generator
function; and from version 3.3, it can be passed through multiple stack levels.

Expressions
Python's expressions include:

• The +, -, and * operators for mathematical addition, subtraction, and


multiplication are similar to other languages, but the behavior of division
differs. There are two types of divisions in Python: floor division (or
integer division) // and floating-point/division.[102] Python uses
the ** operator for exponentiation.
• Python uses the + operator for string concatenation. Python uses
the * operator for duplicating a string a specified number of times.
• The @ infix operator. It is intended to be used by libraries such
as NumPy for matrix multiplication.[103][104]
• The syntax :=, called the "walrus operator", was introduced in Python
3.8. It assigns values to variables as part of a larger expression.[105]
• In Python, == compares by value. Python's is operator may be used to
compare object identities (comparison by reference), and comparisons
may be chained—for example, a <= b <= c.
• Python uses and, or, and not as Boolean operators.
• Python has a type of expression named a list comprehension, and a more
general expression named a generator expression.[75]
• Anonymous functions are implemented using lambda expressions;
however, there may be only one expression in each body.
• Conditional expressions are written as x if c else y[106] (different in order
of operands from the c ? x : y operator common to many other
languages).
• Python makes a distinction between lists and tuples. Lists are written
as [1, 2, 3], are mutable, and cannot be used as the keys of dictionaries
(dictionary keys must be immutable in Python). Tuples, written
as (1, 2, 3), are immutable and thus can be used as keys of dictionaries,
provided all of the tuple's elements are immutable. The + operator can be
used to concatenate two tuples, which does not directly modify their
contents, but produces a new tuple containing the elements of both.
Thus, given the variable t initially equal to (1, 2, 3),
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

executing t = t + (4, 5) first evaluates t + (4, 5), which


yields (1, 2, 3, 4, 5), which is then assigned back to t—thereby
effectively "modifying the contents" of t while conforming to the
immutable nature of tuple objects. Parentheses are optional for tuples in
unambiguous contexts.[107]
• Python features sequence unpacking where multiple expressions, each
evaluating to anything that can be assigned (to a variable, writable
property, etc.) are associated in an identical manner to that forming tuple
literals—and, as a whole, are put on the left-hand side of the equal sign
in an assignment statement. The statement expects an iterable object on
the right-hand side of the equal sign that produces the same number of
values as the provided writable expressions; when iterated through them,
it assigns each of the produced values to the corresponding expression
on the left.[108]
• Python has a "string format" operator % that functions analogously
to printf format strings in C—
e.g. "spam=%s eggs=%d" % ("blah", 2) evaluates to "spam=blah
eggs=2". In Python 2.6+ and 3+, this was supplemented by
the format() method of the str class,
e.g. "spam={0} eggs={1}".format("blah", 2). Python 3.6 added "f-
strings": spam = "blah"; eggs = 2; f'spam={spam} eggs={eggs}'.[109]
• Strings in Python can be concatenated by "adding" them (with the same
operator as for adding integers and floats),
e.g. "spam" + "eggs" returns "spameggs". If strings contain numbers,
they are added as strings rather than integers, e.g. "2" + "2" returns "22".
• Python has various string literals:
• Delimited by single or double quotes; unlike in Unix
shells, Perl, and Perl-influenced languages, single and double
quotes work the same. Both use the backslash (\) as an escape
character. String interpolation became available in Python 3.6 as
"formatted string literals".[109]
• Triple-quoted (beginning and ending with three single or double
quotes), which may span multiple lines and function like here
documents in shells, Perl, and Ruby.
• Raw string varieties, denoted by prefixing the string literal
with r. Escape sequences are not interpreted; hence raw strings
are useful where literal backslashes are common, such
as regular expressions and Windows-style paths. (Compare "@-
quoting" in C#.)
• Python has array index and array slicing expressions in lists, denoted
as a[key], a[start:stop] or a[start:stop:step]. Indexes are zero-based, and
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

negative indexes are relative to the end. Slices take elements from
the start index up to, but not including, the stop index. The third slice
parameter, called step or stride, allows elements to be skipped and
reversed. Slice indexes may be omitted—for example, a[:] returns a
copy of the entire list. Each element of a slice is a shallow copy.
In Python, a distinction between expressions and statements is rigidly enforced,
in contrast to languages such as Common Lisp, Scheme, or Ruby. This leads to
duplicating some functionality. For example:

• List comprehensions vs. for-loops


• Conditional expressions vs. if blocks
• The eval() vs. exec() built-in functions (in Python 2, exec is a
statement); the former is for expressions, the latter is for statements
Statements cannot be a part of an expression—so list and other comprehensions
or lambda expressions, all being expressions, cannot contain statements. A
particular case is that an assignment statement such as a = 1 cannot form part of
the conditional expression of a conditional statement.

Arithmetic operations :
Python has the usual symbols for arithmetic operators (+, -, *, /), the floor
division operator // and the modulo operation % (where the remainder can be
negative, e.g. 4 % -3 == -2). It also has ** for exponentiation, e.g. 5**3 ==
125 and 9**0.5 == 3.0, and a matrix-multiplication operator @ .[120] These
operators work like in traditional math; with the same precedence rules, the
operators infix (+ and - can also be unary to represent positive and negative
numbers respectively).
The division between integers produces floating-point results. The behavior of
division has changed significantly over time:[121]

• Current Python (i.e. since 3.0) changed / to always be floating-point


division, e.g. 5/2 == 2.5.
• The floor division // operator was introduced. So 7//3 == 2, -7//3 == -
3, 7.5//3 == 2.0 and -7.5//3 == -3.0.
Adding from __future__ import division causes a module used in
Python 2.7 to use Python 3.0 rules for division (see above).
In Python terms, / is true division (or simply division), and // is floor
division. / before version 3.0 is classic division.[121]
Rounding towards negative infinity, though different from most languages, adds
consistency. For instance, it means that the equation (a + b)//b == a//b + 1 is
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

always true. It also means that the equation b*(a//b) + a%b == a is valid for both
positive and negative values of a. However, maintaining the validity of this
equation means that while the result of a%b is, as expected, in the half-open
interval [0, b), where b is a positive integer, it has to lie in the interval (b, 0]
when b is negative.[122]
Python provides a round function for rounding a float to the nearest integer.
For tie-breaking, Python 3 uses round to even: round(1.5) and round(2.5) both
produce 2.[123] Versions before 3 used round-away-from-
zero: round(0.5) is 1.0, round(-0.5) is −1.0.[124]
Python allows Boolean expressions with multiple equality relations in a manner
that is consistent with general use in mathematics. For example, the expression a
< b < c tests whether a is less than b and b is less than c.[125] C-derived languages
interpret this expression differently: in C, the expression would first evaluate a <
b, resulting in 0 or 1, and that result would then be compared with c.[126]
Python uses arbitrary-precision arithmetic for all integer operations.
The Decimal type/class in the decimal module provides decimal floating-point
numbers to a pre-defined arbitrary precision and several rounding
modes. The Fraction class in the fractions module provides arbitrary precision
for rational numbers.
Due to Python's extensive mathematics library, and the third-party
library NumPy that further extends the native capabilities, it is frequently used as
a scientific scripting language to aid in problems such as numerical data
processing and manipulation.

Libraries :

Python's large standard library[131] provides tools suited to many tasks and is
commonly cited as one of its greatest strengths. For Internet-facing applications,
many standard formats and protocols such as MIME and HTTP are supported. It
includes modules for creating graphical user interfaces, connecting to relational
databases, generating pseudorandom numbers, arithmetic with arbitrary-precision
decimals,[127] manipulating regular expressions, and unit testing.
Some parts of the standard library are covered by specifications—for example,
the Web Server Gateway Interface (WSGI) implementation wsgiref follows PEP
333[132]—but most are specified by their code, internal documentation, and test
suites. However, because most of the standard library is cross-platform Python
code, only a few modules need altering or rewriting for variant implementations.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

As of 17 March 2024, the Python Package Index (PyPI), the official repository
for third-party Python software, contains over 523,000[133] packages with a wide
range of functionality, including:

• Automation
• Data analytics
• Databases
• Documentation
• Graphical user interfaces
• Image processing
• Machine learning
• Mobile apps
• Multimedia
• Computer networking
• Scientific computing
• System administration
• Test frameworks
• Text processing
• Web frameworks
• Web scraping

Development environments
Most Python implementations (including CPython) include a read–eval–print
loop (REPL), permitting them to function as a command line interpreter for
which users enter statements sequentially and receive results immediately.
Python also comes with an Integrated development environment
(IDE) called IDLE, which is more beginner-oriented.
Other shells, including IDLE and IPython, add further abilities such as improved
auto-completion, session state retention, and syntax highlighting.
As well as standard desktop integrated development environments including
PyCharm, IntelliJ Idea, Visual Studio Code etc, there are web browser-based
IDEs, including SageMath, for developing science- and math-related
programs; PythonAnywhere, a browser-based IDE and hosting environment; and
Canopy IDE, a commercial IDE emphasizing scientific computing.[134]

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Implementations :

Reference implementation
CPython is the reference implementation of Python. It is written in C, meeting
the C89 standard (Python 3.11 uses C11[135]) with several select C99 features.
CPython includes its own C extensions, but third-party extensions are not limited
to older C versions—e.g. they can be implemented with C11 or
C++.[136][137] CPython compiles Python programs into an
intermediate bytecode[138] which is then executed by its virtual
machine.[139] CPython is distributed with a large standard library written in a
mixture of C and native Python, and is available for many platforms, including
Windows (starting with Python 3.9, the Python installer deliberately fails to
install on Windows 7 and 8;[140][141] Windows XP was supported until Python 3.5)
and most modern Unix-like systems, including macOS (and Apple M1 Macs,
since Python 3.9.1, with experimental installer), with unofficial support
for VMS.[142] Platform portability was one of its earliest priorities.[143] (During
Python 1 and 2 development, even OS/2 and Solaris were supported,[144] but
support has since been dropped for many platforms.)
Python, since 3.7, only supports operating systems with multi-threading support.

Other implementations :

• PyPy is a fast, compliant interpreter of Python 2.7 and


3.8.[145][146] Its just-in-time compiler often brings a significant speed
improvement over CPython, but some libraries written in C cannot be
used with it.[147]
• Stackless Python is a significant fork of CPython that
implements microthreads; it does not use the call stack in the same way,
thus allowing massively concurrent programs. PyPy also has a stackless
version.[148]
• MicroPython and CircuitPython are Python 3 variants optimized
for microcontrollers, including Lego Mindstorms EV3.[149]
• Pyston is a variant of the Python runtime that uses just-in-time
compilation to speed up the execution of Python programs.[150]
• Cinder is a performance-oriented fork of CPython 3.8 that contains a
number of optimizations, including bytecode inline caching, eager
evaluation of coroutines, a method-at-a-time JIT, and an experimental
bytecode compiler.[151]

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

• Snek[152][153][154] Embedded Computing Language (compatible with e.g.


8-bit AVR microcontrollers such as ATmega 328P-based Arduino, as
well as larger ones compatible with MicroPython) "is Python-inspired,
but it is not Python. It is possible to write Snek programs that run under
a full Python system, but most Python programs will not run under
Snek."[155] It is an imperative language not including OOP / classes,
unlike Python, and simplifying to one number type with 32-bit single-
precision (similar to JavaScript, except smaller).

Unsupported implementations:
Other just-in-time Python compilers have been developed, but are now
unsupported:

• Google began a project named Unladen Swallow in 2009, with the aim
of speeding up the Python interpreter five-fold by using the LLVM, and
of improving its multithreading ability to scale to thousands of
cores,[156] while ordinary implementations suffer from the global
interpreter lock.
• Psyco is a discontinued just-in-time specializing compiler that integrates
with CPython and transforms bytecode to machine code at runtime. The
emitted code is specialized for certain data types and is faster than the
standard Python code. Psyco does not support Python 2.7 or later.
• PyS60 was a Python 2 interpreter for Series 60 mobile phones released
by Nokia in 2005. It implemented many of the modules from the
standard library and some additional modules for integrating with
the Symbian operating system. The Nokia N900 also supports Python
with GTK widget libraries, enabling programs to be written and run on
the target device.

Cross-compilers to other languages:


There are several compilers/transpilers to high-level object languages, with either
unrestricted Python, a restricted subset of Python, or a language similar to Python
as the source language:

• Brython,[158] Transcrypt[159][160] and Pyjs (latest release in 2012) compile


Python to JavaScript.
• Codon compiles a subset of statically typed Python[161] to machine code
(via LLVM) and supports native multithreading.[162]

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

• Cython compiles (a superset of) Python to C. The resulting code is also


usable with Python via direct C-level API calls into the Python
interpreter.
• PyJL compiles/transpiles a subset of Python to "human-readable,
maintainable, and high-performance Julia source code".[86] Despite
claiming high performance, no tool can claim to do that
for arbitrary Python code; i.e. it's known not possible to compile to a
faster language or machine code. Unless semantics of Python are
changed, but in many cases speedup is possible with few or no changes
in the Python code. The faster Julia source code can then be used from
Python, or compiled to machine code, and based that way.
• Nuitka compiles Python into C.[163]
• Numba uses LLVM to compile a subset of Python to machine code.
• Pythran compiles a subset of Python 3 to C++ (C++11).[164]
• RPython can be compiled to C, and is used to build the PyPy interpreter
of Python.
• The Python → 11l → C++ transpiler[165] compiles a subset of Python 3
to C++ (C++17).
Specialized:

• MyHDL is a Python-based hardware description language (HDL), that


converts MyHDL code to Verilog or VHDL code.
Older projects (or not to be used with Python 3.x and latest syntax):

• Google's Grumpy (latest release in 2017) transpiles Python 2


to Go.[166][167][168]
• IronPython allows running Python 2.7 programs (and an alpha, released
in 2021, is also available for "Python 3.4, although features and
behaviors from later versions may be included"[169]) on the
.NET Common Language Runtime.[170]
• Jython compiles Python 2.7 to Java bytecode, allowing the use of the
Java libraries from a Python program.[171]
• Pyrex (latest release in 2010) and Shed Skin (latest release in 2013)
compile to C and C++ respectively.

Performance:
Performance comparison of various Python implementations on a non-numerical
(combinatorial) workload was presented at EuroSciPy '13.[172] Python's

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

performance compared to other programming languages is also benchmarked


by The Computer Language Benchmarks Game.

Development:
Python's development is conducted largely through the Python Enhancement
Proposal (PEP) process, the primary mechanism for proposing major new
features, collecting community input on issues, and documenting Python design
decisions.[174] Python coding style is covered in PEP 8.[175] Outstanding PEPs are
reviewed and commented on by the Python community and the steering
council.[174]
Enhancement of the language corresponds with the development of the CPython
reference implementation. The mailing list python-dev is the primary forum for
the language's development. Specific issues were originally discussed in
the Roundup bug tracker hosted at by the foundation.[176] In 2022, all issues and
discussions were migrated to GitHub.[177] Development originally took place on
a self-hosted source-code repository running Mercurial, until Python moved
to GitHub in January 2017.[178]
CPython's public releases come in three types, distinguished by which part of the
version number is incremented:

• Backward-incompatible versions, where code is expected to break and


needs to be manually ported. The first part of the version number is
incremented. These releases happen infrequently—version 3.0 was
released 8 years after 2.0. According to Guido van Rossum, a version 4.0
is very unlikely to ever happen.[179]
• Major or "feature" releases are largely compatible with the previous
version but introduce new features. The second part of the version
number is incremented. Starting with Python 3.9, these releases are
expected to happen annually.[180][181] Each major version is supported by
bug fixes for several years after its release.[182]
• Bugfix releases,[183] which introduce no new features, occur about every
3 months and are made when a sufficient number of bugs have been
fixed upstream since the last release. Security vulnerabilities are also
patched in these releases. The third and final part of the version number
is incremented.[183]
Many alpha, beta, and release-candidates are also released as previews and for
testing before final releases. Although there is a rough schedule for each release,
they are often delayed if the code is not ready. Python's development team
monitors the state of the code by running the large unit test suite during
development.[184]
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

The major academic conference on Python is PyCon. There are also special
Python mentoring programs, such as PyLadies.
Python 3.12 removed wstr meaning Python extensions[185] need to be
modified,[186] and 3.10 added pattern matching to the language.[187]
Python 3.12 dropped some outdated modules, and more will be dropped in the
future, deprecated as of 3.13; already deprecated array 'u' format code will
emit DeprecationWarning since 3.13 and will be removed in Python 3.16. The 'w'
format code should be used instead. Part of ctypes is also deprecated
and http.server.CGIHTTPRequestHandler will emit a DeprecationWarning, and
will be removed in 3.15. Using that code already has a high potential for both
security and functionality bugs. Parts of the typing module are deprecated, e.g.
creating a typing.NamedTuple class using keyword arguments to denote the
fields and such (and more) will be disallowed in Python 3.15.

API documentation generators:


Tools that can generate documentation for Python API include pydoc (available
as part of the standard library), Sphinx, Pdoc and its
forks, Doxygen and Graphviz, among others.

Naming:

Python's name is derived from the British comedy group Monty Python, whom
Python creator Guido van Rossum enjoyed while developing the language.
Monty Python references appear frequently in Python code and culture;[189] for
example, the metasyntactic variables often used in Python literature
are spam and eggs instead of the traditional foo and bar.[189][190] The official
Python documentation also contains various references to Monty Python
routines.[191][192] Users of Python are sometimes referred to as "Pythonistas".[193]
The prefix Py- is used to show that something is related to Python. Examples of
the use of this prefix in names of Python applications or libraries
include Pygame, a binding of SDL to Python (commonly used to create
games); PyQt and PyGTK, which bind Qt and GTK to Python respectively;
and PyPy, a Python implementation originally written in Python.

Popularity:

Since 2003, Python has consistently ranked in the top ten most popular
programming languages in the TIOBE Programming Community Index where as
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

of December 2022 it was the most popular language (ahead of C, C++,


and Java).[40] It was selected as Programming Language of the Year (for "the
highest rise in ratings in a year") in 2007, 2010, 2018, and 2020 (the only
language to have done so four times as of 2020).
Large organizations that use Python
include Wikipedia, Google, Yahoo!, CERN, NASA, Facebook, Amazon, Instagra
m, Spotify, and some smaller entities like ILM and ITA. The social news
networking site Reddit was written mostly in Python.

Uses:

Main article: List of Python software

Python Powered
Python can serve as a scripting language for web applications, e.g.
via mod_wsgi for the Apache webserver.[205] With Web Server Gateway
Interface, a standard API has evolved to facilitate these applications. Web
frameworks like Django, Pylons, Pyramid, TurboGears, web2py, Tornado, Flask,
Bottle, and Zope support developers in the design and maintenance of complex
applications. Pyjs and IronPython can be used to develop the client-side of Ajax-
based applications. SQLAlchemy can be used as a data mapper to a relational
database. Twisted is a framework to program communications between
computers, and is used (for example) by Dropbox.
Libraries such as NumPy, SciPy and Matplotlib allow the effective use of Python
in scientific computing,[206][207] with specialized libraries such
as Biopython and Astropy providing domain-specific functionality. SageMath is
a computer algebra system with a notebook interface programmable in Python:
its library covers many aspects of mathematics,
including algebra, combinatorics, numerical mathematics, number theory,
and calculus.[208] OpenCV has Python bindings with a rich set of features
for computer vision and image processing.
Python is commonly used in artificial intelligence projects and machine learning
projects with the help of libraries like TensorFlow, Keras, Pytorch, scikit-
learn and the Logic language ProbLog. As a scripting language with a modular
Aditya Shukla (B2155R10195014)
Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

architecture, simple syntax, and rich text processing tools, Python is often used
for natural language processing.
The combination of Python and Prolog has proved to be particularly useful for AI
applications, with Prolog providing knowledge representation and reasoning
capablities. The Janus system, in particular, exploits the similarites between these
two languages, in part because of their use of dynamic typing, and the simple
recursive nature of their data structures. Typical applications of this combination
include natural language processing, visual query answering, geospatial
reasoning, and handling of semantic web data. The Natlog system, implemented
in Python, uses Definite Clause Grammars (DCGs) as prompt generators for text-
to-text generators like GPT3 and text-to-image generators like DALL-E or Stable
Diffusion.
Python can also be used for graphical user interface (GUI) by using libraries
like Tkinter.
Python has been successfully embedded in many software products as a scripting
language, including in finite element method software such as Abaqus, 3D
parametric modelers like FreeCAD, 3D animation packages such as 3ds
Max, Blender, Cinema
4D, Lightwave, Houdini, Maya, modo, MotionBuilder, Softimage, the visual
effects compositor Nuke, 2D imaging programs
like GIMP,[221] Inkscape, Scribus and Paint Shop Pro, and musical
notation programs like scorewriter and capella. GNU Debugger uses Python as
a pretty printer to show complex structures such as C++
containers. Esri promotes Python as the best choice for writing scripts
in ArcGIS.[223] It has also been used in several video games, and has been
adopted as first of the three available programming languages in Google App
Engine, the other two being Java and Go.
Many operating systems include Python as a standard component. It ships with
most Linux distributions, AmigaOS 4 (using Python 2.7), FreeBSD (as a
package), NetBSD, and OpenBSD (as a package) and can be used from the
command line (terminal). Many Linux distributions use installers written in
Python: Ubuntu uses the Ubiquity installer, while Red Hat Linux and Fedora
Linux use the Anaconda installer. Gentoo Linux uses Python in its package
management system, Portage.
Python is used extensively in the information security industry, including in
exploit development.
Most of the Sugar software for the One Laptop per Child XO, developed at Sugar
Labs as of 2008, is written in Python.[230] The Raspberry Pi single-board
computer project has adopted Python as its main user-programming language.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

LibreOffice includes Python and intends to replace Java with Python. Its Python
Scripting Provider is a core feature since Version 4.0 from 7 February 2013.

Languages influenced by Python:

Python's design and philosophy have influenced many other programming


languages:

• Boo uses indentation, a similar syntax, and a similar object model.[232]


• Cobra uses indentation and a similar syntax, and
its Acknowledgements document lists Python first among languages that
influenced it.
• CoffeeScript, a programming language that cross-compiles to
JavaScript, has Python-inspired syntax.
• ECMAScript–JavaScript borrowed iterators and generators from
Python.[234]
• GDScript, a scripting language very similar to Python, built-in to
the Godot game engine.
• Go is designed for the "speed of working in a dynamic language like
Python" and shares the same syntax for slicing arrays.
• Groovy was motivated by the desire to bring the Python design
philosophy to Java.
• Julia was designed to be "as usable for general programming as Python".
• Mojo is a non-strict superset of Python (e.g. still missing classes, and
adding e.g. struct).
• Nim uses indentation and similar syntax.
• Ruby's creator, Yukihiro Matsumoto, has said: "I wanted a scripting
language that was more powerful than Perl, and more object-oriented
than Python. That's why I decided to design my own language."
• Swift, a programming language developed by Apple, has some Python-
inspired syntax.
• Kotlin blends Python and Java features, minimizing boilerplate code for
enhanced developer efficiency.
Python's development practices have also been emulated by other languages. For
example, the practice of requiring a document describing the rationale for, and
issues surrounding, a change to the language (in Python, a PEP) is also used
in Tcl, Erlang. and Swift.

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Project :-

Setting up Your Development Environment :


Before we dive into the world of Python chess game development, let's ensure
you have everything you need to get started.

1. Install Python: If you haven't already, download and install Python from
the official website (https://www. python.org/downloads/). Make sure to
choose the latest stable version.
2. Pygame Installation: Pygame is a powerful library that simplifies game
development. You can install it using pip by running the following
command in your terminal or command prompt:

pip install pygame

we'll start building the chessboard. We'll create a graphical interface using
Pygame and set up the initial chessboard layout.

we'll import the necessary libraries:

import pygame

Next, we'll initialize Pygame and set up the display window:

pygame.init()

screen = pygame.display.set_mode((800, 600))

pygame.display.set_caption("Python Chess Game Tutorial with


Pygame")

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

project source code:

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

We are making the foloder and inside the folder there are photos of
various component of the chess li king queen bishop pawns etc…

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python
AKS University Satna Department of computer science

Output of the project:

Aditya Shukla (B2155R10195014)


Lakee Pandey (B2155R10195029) Chess game development with python

You might also like