SlideShare a Scribd company logo
1 of 21
By:
Jojo naqvi
 Game artificial intelligence refers to techniques
used in computer and video games to produce
the illusion of intelligence in the behavior of
non-player characters (NPCs)
 Hacks and cheats are acceptable and, in many
cases, the computer abilities must be toned
down to give human players a sense of fairness.
E.g racing and shooting
1
 AI has continued to improve, with aims set on a
player being unable to tell the difference
between computer and human players.
 A game must „feel‟ natural
◦ Obey laws of the game
◦ Characters aware of the environment
◦ Path finding (A* algorithm)
◦ Decision making
◦ Planning
3
 Games are fun!
 They are limited, well-defined rules
 They are one of the few domains that allow us to
build agents.
 Studying games teaches us how to deal with other
agents trying to foil our plans
 Nice, clean environment with clear criteria for
success
 Game playing is considered an intelligent human
activity.
 AI has always been interested in abstract games.
 Games present an ideal environment where hostile
agents may compete.
4
 Machine Learning - also
known as ML, is a field of
artificial intelligence
which focuses on
developing algorithms
that can learn to predict,
classify, control, or solve
problems.
 Reinforcement Learning -
Taking past data that the
AI has recorded and
using it to influence
behavior and choices
made in the future.
 Waypoint Graph - is a
collection of waypoints
linked up to form the
information about what
areas of a level can be
traversed by an actor
during path finding.
5
 Game AI is about the illusion of human behaviour
◦ Smart, to a certain extent (Creativity)
◦ Non-repeating behaviour
◦ Emotional influences (Irrationality, „Personality‟)
◦ Body language to communicate emotions
◦ Being integrated in the environment
 Game AI needs various computer science disciplines
◦ Knowledge Based Systems
◦ Machine Learning
◦ Multi-agent Systems
◦ Computer Graphics & Animation
◦ Data Structures
6
 Strategy Games
◦ Real-Time Strategy (RTS)
◦ Turn-Based Strategy (TBS)
◦ Helicopter view
 Role-Playing Games (RPG)
◦ Single-Player
◦ Multi-Player (MMORPG)
 Action Games
◦ First-Person Shooters (FPS)
◦ First-Person Sneakers
 Sports Games
 Simulations
 Adventure Games
 Puzzle Games
7
8
23-Mar-20009Artificial Intelligence - CMT310 9
 providing more multi-human gaming
opportunities
◦ Teaming up with/against other
humans
◦ Large environments
◦ Changing environments
10
 A* algorithm gives the shortest path from
predator to prey in a tiled environment.
 This can be used for chase/evade.
 However, alternatives exist.
if (predatorX > preyX) {
predatorX--;
} else if (predatorX == preyX) {
// do nothing
} else {
predatorX++;
}
if (predatorY > preyY) {
predatorY--;
} else if (predatorY == preyY) {
// do nothing
} else {
predatorY++;
}
assuming tiled environment
Predator is at coordinates (predatorX,predatorY).
Prey is at coordinates (preyX,preyY).
This algorithm will update predator coordinates.
Algorithm for prey (evade) is just the opposite.
 This chase algorithm is not natural.
 Suppose the prey and predator are at the
coordinates below, then the algorithm will
give the following path.
prey
predator
 Instead we want a more natural path like
below.
prey
predator
What is Data Structure?
 In computer science, a data structure is a particular
way of storing and organizing data in a computer
so that it can be used efficiently.
 Data structures are used in almost every program
or software system.
 Data structures provide a means to manage huge
amounts of data efficiently.
What is Chess?
 Chess is a two-player board game played on a
chessboard, a square checkered board with
64 squares arranged in an eight-by-eight grid. It
is one of the world's most popular games, played
by millions of people worldwide.
 In computer chess, software developers must
choose a data structure to represent chess
positions on the chessboard
 In computer chess, software developers must
choose a data structure to represent the chess
board and chess positions. Several data structures
exist, collectively known as board representations.
Some are given below
 Offset board representation
 Bitmap board representation
 Two-dimensional array representation
 0X88 board representation
 Huffman encoding technique for chess pieces
 horizontal lines are called “Ranks”
 vertical lines are called “Columns” (column A,
column B… column H)
 Talking about indexes of array you can
imagine an 8 x 8 chess board in this way:
 The formula to calculate a square is:
 Index = rank * 8 + column
 where rank 1, rank 2,…, rank 8 and column
A, column B,…, column H are 0,1,2…7; the
index of square “e4″ is : 3 * 8 + 4=28 .
 Where c is a bit representing the color of the piece (1 = LIGHT, 0 = DARK)

More Related Content

What's hot

Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313
Slideshare
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
Nilu Desai
 
Artificial Intelligence Robotics (AI) PPT by Aamir Saleem Ansari
Artificial Intelligence Robotics (AI) PPT by Aamir Saleem AnsariArtificial Intelligence Robotics (AI) PPT by Aamir Saleem Ansari
Artificial Intelligence Robotics (AI) PPT by Aamir Saleem Ansari
Tech
 
Lecture1 AI1 Introduction to artificial intelligence
Lecture1 AI1 Introduction to artificial intelligenceLecture1 AI1 Introduction to artificial intelligence
Lecture1 AI1 Introduction to artificial intelligence
Albert Orriols-Puig
 

What's hot (20)

Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Project on ai gaming
Project on ai gamingProject on ai gaming
Project on ai gaming
 
Tic tac toe simple ai game
Tic tac toe simple ai gameTic tac toe simple ai game
Tic tac toe simple ai game
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313
 
Adversarial search
Adversarial search Adversarial search
Adversarial search
 
Artificial intelligence
Artificial intelligence Artificial intelligence
Artificial intelligence
 
Introduction Artificial Intelligence a modern approach by Russel and Norvig 1
Introduction Artificial Intelligence a modern approach by Russel and Norvig 1Introduction Artificial Intelligence a modern approach by Russel and Norvig 1
Introduction Artificial Intelligence a modern approach by Russel and Norvig 1
 
Reasoning in AI
Reasoning in AIReasoning in AI
Reasoning in AI
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
First order logic
First order logicFirst order logic
First order logic
 
Tic Tac Toe using Mini Max Algorithm
Tic Tac Toe using Mini Max AlgorithmTic Tac Toe using Mini Max Algorithm
Tic Tac Toe using Mini Max Algorithm
 
AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)
 
Problems problem spaces and search
Problems problem spaces and searchProblems problem spaces and search
Problems problem spaces and search
 
Unit III Knowledge Representation in AI K.Sundar,AP/CSE,VEC
Unit III  Knowledge Representation in AI   K.Sundar,AP/CSE,VECUnit III  Knowledge Representation in AI   K.Sundar,AP/CSE,VEC
Unit III Knowledge Representation in AI K.Sundar,AP/CSE,VEC
 
Artificial Intelligence Robotics (AI) PPT by Aamir Saleem Ansari
Artificial Intelligence Robotics (AI) PPT by Aamir Saleem AnsariArtificial Intelligence Robotics (AI) PPT by Aamir Saleem Ansari
Artificial Intelligence Robotics (AI) PPT by Aamir Saleem Ansari
 
peas description of task environment with different types of properties
 peas description of task environment with different types of properties peas description of task environment with different types of properties
peas description of task environment with different types of properties
 
ARTIFICIAL INTELLIGENCE Presentation
ARTIFICIAL INTELLIGENCE PresentationARTIFICIAL INTELLIGENCE Presentation
ARTIFICIAL INTELLIGENCE Presentation
 
Lecture1 AI1 Introduction to artificial intelligence
Lecture1 AI1 Introduction to artificial intelligenceLecture1 AI1 Introduction to artificial intelligence
Lecture1 AI1 Introduction to artificial intelligence
 
Final year project presentation
Final year project presentationFinal year project presentation
Final year project presentation
 
artificial intelligence ppt.pptx
artificial intelligence ppt.pptxartificial intelligence ppt.pptx
artificial intelligence ppt.pptx
 

Viewers also liked

Introduction to AI - Seventh Lecture
Introduction to AI - Seventh LectureIntroduction to AI - Seventh Lecture
Introduction to AI - Seventh Lecture
Wouter Beek
 
Artificially Intelligent Design(er). The End of User Experience as we know it?
Artificially Intelligent Design(er). The End of User Experience as we know it?Artificially Intelligent Design(er). The End of User Experience as we know it?
Artificially Intelligent Design(er). The End of User Experience as we know it?
Agnieszka Maria Walorska
 

Viewers also liked (7)

Game Design Dokumentation und Projekt Management
Game Design Dokumentation und Projekt Management Game Design Dokumentation und Projekt Management
Game Design Dokumentation und Projekt Management
 
Introduction to AI - Seventh Lecture
Introduction to AI - Seventh LectureIntroduction to AI - Seventh Lecture
Introduction to AI - Seventh Lecture
 
Asynchronous Multiplayer on Mobile Network
Asynchronous Multiplayer on Mobile NetworkAsynchronous Multiplayer on Mobile Network
Asynchronous Multiplayer on Mobile Network
 
Practical AI in Games
Practical AI in GamesPractical AI in Games
Practical AI in Games
 
Approaches to game AI overview
Approaches to game AI overviewApproaches to game AI overview
Approaches to game AI overview
 
Artificially Intelligent Design(er). The End of User Experience as we know it?
Artificially Intelligent Design(er). The End of User Experience as we know it?Artificially Intelligent Design(er). The End of User Experience as we know it?
Artificially Intelligent Design(er). The End of User Experience as we know it?
 
Game design document template for serious games
Game design document template for serious gamesGame design document template for serious games
Game design document template for serious games
 

Similar to Game playing in artificial intelligent technique

Gameplaying in artificial intelligence
Gameplaying in artificial intelligenceGameplaying in artificial intelligence
Gameplaying in artificial intelligence
oceanparkk
 
Learning to Play Complex Games
Learning to Play Complex GamesLearning to Play Complex Games
Learning to Play Complex Games
butest
 
Introduction to Artificial Intelligence
Introduction to Artificial IntelligenceIntroduction to Artificial Intelligence
Introduction to Artificial Intelligence
Ahmed Hani Ibrahim
 
Presentation sanlab workshops
Presentation sanlab workshopsPresentation sanlab workshops
Presentation sanlab workshops
Artur Roszczyk
 

Similar to Game playing in artificial intelligent technique (20)

Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Gameplaying in artificial intelligence
Gameplaying in artificial intelligenceGameplaying in artificial intelligence
Gameplaying in artificial intelligence
 
Artificial Intelligence gaming techniques
Artificial Intelligence gaming techniquesArtificial Intelligence gaming techniques
Artificial Intelligence gaming techniques
 
Learning to Play Complex Games
Learning to Play Complex GamesLearning to Play Complex Games
Learning to Play Complex Games
 
Game designing using artificial intelligence
Game designing using artificial intelligenceGame designing using artificial intelligence
Game designing using artificial intelligence
 
Introduction To My Graduation Project
Introduction To My Graduation ProjectIntroduction To My Graduation Project
Introduction To My Graduation Project
 
Introduction To My Graduation Project
Introduction To My Graduation ProjectIntroduction To My Graduation Project
Introduction To My Graduation Project
 
Why AI Is Shaping our games - Johanna Pirker, 2019
Why AI Is Shaping our games - Johanna Pirker, 2019Why AI Is Shaping our games - Johanna Pirker, 2019
Why AI Is Shaping our games - Johanna Pirker, 2019
 
Libratus
LibratusLibratus
Libratus
 
Introduction to Artificial Intelligence
Introduction to Artificial IntelligenceIntroduction to Artificial Intelligence
Introduction to Artificial Intelligence
 
The Role of Shologuti in Artificial Intelligence Research: A Rural Game of Ba...
The Role of Shologuti in Artificial Intelligence Research: A Rural Game of Ba...The Role of Shologuti in Artificial Intelligence Research: A Rural Game of Ba...
The Role of Shologuti in Artificial Intelligence Research: A Rural Game of Ba...
 
PHP games
PHP gamesPHP games
PHP games
 
International journal of engineering issues vol 2015 - no 2 - paper1
International journal of engineering issues   vol 2015 - no 2 - paper1International journal of engineering issues   vol 2015 - no 2 - paper1
International journal of engineering issues vol 2015 - no 2 - paper1
 
Overview on computer games
Overview on computer games Overview on computer games
Overview on computer games
 
20131105 concepts of game design
20131105 concepts of game design20131105 concepts of game design
20131105 concepts of game design
 
Presentation sanlab workshops
Presentation sanlab workshopsPresentation sanlab workshops
Presentation sanlab workshops
 
Web Game Development
Web Game DevelopmentWeb Game Development
Web Game Development
 
Computer Chess 2004
Computer Chess 2004Computer Chess 2004
Computer Chess 2004
 
Artificial Intelligence in Gaming
Artificial Intelligence in GamingArtificial Intelligence in Gaming
Artificial Intelligence in Gaming
 
AI_Sher Singh Shekhawat.pdf
AI_Sher Singh Shekhawat.pdfAI_Sher Singh Shekhawat.pdf
AI_Sher Singh Shekhawat.pdf
 

More from syeda zoya mehdi

More from syeda zoya mehdi (10)

Sony nextep
Sony nextepSony nextep
Sony nextep
 
Android vs window
Android vs windowAndroid vs window
Android vs window
 
Maslow, herzberg, mc clelland, ouchi, thamhain and wilemon and convey theories
Maslow, herzberg, mc clelland, ouchi, thamhain and wilemon and convey theoriesMaslow, herzberg, mc clelland, ouchi, thamhain and wilemon and convey theories
Maslow, herzberg, mc clelland, ouchi, thamhain and wilemon and convey theories
 
Project quality management
Project quality managementProject quality management
Project quality management
 
Mobile phone calling and texting college students in pakistan
Mobile phone calling and texting college students in pakistanMobile phone calling and texting college students in pakistan
Mobile phone calling and texting college students in pakistan
 
Table through php
Table through phpTable through php
Table through php
 
Firewall
FirewallFirewall
Firewall
 
Introduction of javascript
Introduction of javascriptIntroduction of javascript
Introduction of javascript
 
Php update and delet operation
Php update and delet operationPhp update and delet operation
Php update and delet operation
 
Windows phone
Windows phoneWindows phone
Windows phone
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Game playing in artificial intelligent technique

  • 2.  Game artificial intelligence refers to techniques used in computer and video games to produce the illusion of intelligence in the behavior of non-player characters (NPCs)  Hacks and cheats are acceptable and, in many cases, the computer abilities must be toned down to give human players a sense of fairness. E.g racing and shooting 1
  • 3.  AI has continued to improve, with aims set on a player being unable to tell the difference between computer and human players.  A game must „feel‟ natural ◦ Obey laws of the game ◦ Characters aware of the environment ◦ Path finding (A* algorithm) ◦ Decision making ◦ Planning 3
  • 4.  Games are fun!  They are limited, well-defined rules  They are one of the few domains that allow us to build agents.  Studying games teaches us how to deal with other agents trying to foil our plans  Nice, clean environment with clear criteria for success  Game playing is considered an intelligent human activity.  AI has always been interested in abstract games.  Games present an ideal environment where hostile agents may compete. 4
  • 5.  Machine Learning - also known as ML, is a field of artificial intelligence which focuses on developing algorithms that can learn to predict, classify, control, or solve problems.  Reinforcement Learning - Taking past data that the AI has recorded and using it to influence behavior and choices made in the future.  Waypoint Graph - is a collection of waypoints linked up to form the information about what areas of a level can be traversed by an actor during path finding. 5
  • 6.  Game AI is about the illusion of human behaviour ◦ Smart, to a certain extent (Creativity) ◦ Non-repeating behaviour ◦ Emotional influences (Irrationality, „Personality‟) ◦ Body language to communicate emotions ◦ Being integrated in the environment  Game AI needs various computer science disciplines ◦ Knowledge Based Systems ◦ Machine Learning ◦ Multi-agent Systems ◦ Computer Graphics & Animation ◦ Data Structures 6
  • 7.  Strategy Games ◦ Real-Time Strategy (RTS) ◦ Turn-Based Strategy (TBS) ◦ Helicopter view  Role-Playing Games (RPG) ◦ Single-Player ◦ Multi-Player (MMORPG)  Action Games ◦ First-Person Shooters (FPS) ◦ First-Person Sneakers  Sports Games  Simulations  Adventure Games  Puzzle Games 7
  • 8. 8
  • 10.  providing more multi-human gaming opportunities ◦ Teaming up with/against other humans ◦ Large environments ◦ Changing environments 10
  • 11.  A* algorithm gives the shortest path from predator to prey in a tiled environment.  This can be used for chase/evade.  However, alternatives exist.
  • 12. if (predatorX > preyX) { predatorX--; } else if (predatorX == preyX) { // do nothing } else { predatorX++; } if (predatorY > preyY) { predatorY--; } else if (predatorY == preyY) { // do nothing } else { predatorY++; } assuming tiled environment Predator is at coordinates (predatorX,predatorY). Prey is at coordinates (preyX,preyY). This algorithm will update predator coordinates. Algorithm for prey (evade) is just the opposite.
  • 13.  This chase algorithm is not natural.  Suppose the prey and predator are at the coordinates below, then the algorithm will give the following path. prey predator
  • 14.  Instead we want a more natural path like below. prey predator
  • 15. What is Data Structure?  In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.  Data structures are used in almost every program or software system.  Data structures provide a means to manage huge amounts of data efficiently.
  • 16. What is Chess?  Chess is a two-player board game played on a chessboard, a square checkered board with 64 squares arranged in an eight-by-eight grid. It is one of the world's most popular games, played by millions of people worldwide.  In computer chess, software developers must choose a data structure to represent chess positions on the chessboard
  • 17.
  • 18.  In computer chess, software developers must choose a data structure to represent the chess board and chess positions. Several data structures exist, collectively known as board representations. Some are given below  Offset board representation  Bitmap board representation  Two-dimensional array representation  0X88 board representation  Huffman encoding technique for chess pieces
  • 19.  horizontal lines are called “Ranks”  vertical lines are called “Columns” (column A, column B… column H)  Talking about indexes of array you can imagine an 8 x 8 chess board in this way:  The formula to calculate a square is:  Index = rank * 8 + column  where rank 1, rank 2,…, rank 8 and column A, column B,…, column H are 0,1,2…7; the index of square “e4″ is : 3 * 8 + 4=28 .
  • 20.
  • 21.  Where c is a bit representing the color of the piece (1 = LIGHT, 0 = DARK)