SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Teaching AI
through
retro gaming
HOW TO MOTIVATE 21ST
CENTURY STUDENTS
THROUGH 20TH CENTURY
GAMES
Computer Science
General shortage of CS Engineers
worldwide
Artificial Intelligence has gained an
important momentum
Yet very few students finish CS
degrees
What problems students tackle in
introductory AI?
TRAVELLING SALESMAN PROBLEM GOAL STACK PLANNING
Problem:
Keeping
students
motivated
Realising what
they are
atually doing
in class.
Why did you enroll in CS ?
0
50
100
150
200
250
Knowledge General Exp Use in another
field
Money Sit at computer Programming Computer Games Hardware Exp Friend in field
Influences for CS
Male Female
Lori Carter. 2006. Why students with an apparent aptitude for computer science don't choose to major in computer science
Games & AI
• Games have traditionally been one the main research topics in
AI
• IBM Deepblue was a major landmark in AI research
• So was Alpha Go – Google/Deepmind
• Do students relate to Chess & Go ?
• Not very popular when you are 20-21
Computer
Games
WHEN STUDENTS THINK
OF GAME AI THEY THINK
OF:
FIFA, CSGO, LOL,
FORTNITE, PUBG
Matching expectations
AI is an introductory course for 3rd year students
Students programming skills are average, but mostly centred in JAVA and Python
Existing Game Engines place a large overhead and are not core to the course
Frameworks such as OpenSpiel focus in advanced AI techniques (e.g. deeplearning)
Simple games can be easily programmed and repurposed for learning
objectives (card games, arcade games, Atari, NES)
Running a live experiment
After years using a robot simulator (CiberRato) in 2015/16 a first experiment:
◦ Development of Blackjack (cards) playing agents
◦ Students grade proportional to their agent performance (with minimum set of
requirements to classify 10/20)
◦ Students could still do the CiberRato assignment from previous years
◦ Results:
◦ Almost all students opted for the Blackjack agent (despite existing code from
previous years)
◦ Students were eager to improve their agents
AI skills involved
Minimax algorithm
Monte-Carlo Simulation
Bayesian Networks
Some students actually went over the objectives and studied advanced AI algorithms to improve their agents
Improving
Grading was very complicated...
◦ ~70 agents that were required to play ~1000 games (to avoid impact of random events and luck)
◦ Agent/Game agent code tightly bound
◦ Agent was a simple Python Class object (students could temper with game engine, extra code review required)
Retro fitting
a retro game
“Normal” games are not usually
accessible to computer AI’s students
They are monolithical
The UI is bound to the execution
environment
They are not ready for automated
evaluation.
Snakes
In 2016/17 we introduced “Snakes” (originally blockade) – made popular by Nokia
Graphic Engine based on PyGame
Decoupled Agent/UI code from Game Engine (Client-Server Architecture)
One-on-One games
Scoring based on ranking (used ATP rules)
Snakes
• Students could see “live action”
• Deathmatch Snakes in 2016/17
• Collaborative Snakes in 2017/18
Snake
Some students improved the GUI
Difficulties in training (lack of opponents)
Synchronous engine meant game could stall due
to bad AI algorithms.
AI topics:
Search algoritms
A*, Greedy, Depth-First
Jump-point-search
Minimax
Pac-Man
• New asynchronous engine
• Introduced in 2018/19
Pac-Man
Viewer is yet another client (can run the
game headless)
Students get creative, developing
strategies to maximize scores (no longer
simple path finding algorithms)
AI Topics:
Search algoritms
A*, Greedy, Deapth-First
Jump-point-search
Minimax
Bomberman
• Based on previous year engine
• Current edition (2019/20)
Bomberman
Server publicly shares high scores
Students still contributing UI and
develop new strategies
AI Topics
Planning
Search algoritms
A*, Greedy, Deapth-First
Jump-point-search
Going into
detail
HOW-TO MAKE A RETRO GAME
ACCESSIBLE TO AI STUDENTS
Architecture
Games are implemented using a client-server architecture
◦ Server – runs the game logic
◦ Client – runs the AI agent
◦ Viewer – runs the GUI
Server provides a websocket interface to both client’s and
viewer’s pushing game state update asynchronously.
◦ Client updates the AI agent state and provides actions (key press)
◦ Viewers updates the screen
Upon game over the server issues an HTTP POST to a
score server containing information relevant for student
grading (e.g. score, lives, time, steps, etc)
Representation Model
Students get access to the game state through JSON documents
◦ Easily parsable in Python
◦ Human readable (eases debugging)
◦ Well known technology
Actions are those of humans
◦ Agents can press a key at any time through a JSON message containing a single key
The role of
Gamification
A public high score table with KPI’s
keeps student progress
- Has everyone score minimum to
pass?
- How many have reached the end
of the game
- How intelligent is each agent
based on KPI’s
Open Source + GitHub
The base Project is Open Source (MIT)
◦ https://github.com/dgomes/iia-ia-snakes
◦ https://github.com/dgomes/iia-ia-pacman
◦ https://github.com/dgomes/iia-ia-bomberman
Students are encouraged to contribute (extra credits for new features)
Evaluation is carried out through GitHub Classroom
◦ Each group has its own Project (private)
◦ On the deadline the GitHub Classroom collects all the code
◦ Server runs the games headless 10x
Conclusion
◦ We didn’t invent any thing new:
◦ http://modelai.gettysburg.edu
◦ We did get students involved with games they never played before 
◦ Attention to class and time spent in the Project increased
◦ Our colleagues from other courses complained 
◦ Some students actually did the next year Project for fun.
◦ Motivation has clearly increased in class 
Future
◦ This class opened a door for many of them
◦ Participation in hackatons such as Global Game Jam increased
◦ Student interest in developing games is high
◦ We need to attend to this interest (Lic, MSc, Phd?)
◦ Students already search for dissertation topics related to AI/Games
◦ Students planning in running their own hackatons.
Questions?
dgomes@ua.pt
@dgomes

Weitere ähnliche Inhalte

Ähnlich wie Teaching AI through retro gaming

Game Design as an Intro to Computer Science (Meaningful Play 2014)
Game Design as an Intro to Computer Science (Meaningful Play 2014)Game Design as an Intro to Computer Science (Meaningful Play 2014)
Game Design as an Intro to Computer Science (Meaningful Play 2014)marksuter
 
Fetc 2016 creating a game design sequence
Fetc 2016 creating a game design sequenceFetc 2016 creating a game design sequence
Fetc 2016 creating a game design sequenceMike Ploor
 
CTE Video Game Programming Map 7th 12th
CTE Video Game Programming Map 7th 12thCTE Video Game Programming Map 7th 12th
CTE Video Game Programming Map 7th 12thRyan Patton
 
Claussen Windows and Game Programming 2 Syllabus
Claussen Windows and Game Programming 2 SyllabusClaussen Windows and Game Programming 2 Syllabus
Claussen Windows and Game Programming 2 Syllabustlc kalamazoo
 
eMadrid Gaming4Coding - Possibilities of game learning analytics for coding l...
eMadrid Gaming4Coding - Possibilities of game learning analytics for coding l...eMadrid Gaming4Coding - Possibilities of game learning analytics for coding l...
eMadrid Gaming4Coding - Possibilities of game learning analytics for coding l...eMadrid network
 
AI Based Game Design - Teaching how to expand designers' artistic palette wit...
AI Based Game Design - Teaching how to expand designers' artistic palette wit...AI Based Game Design - Teaching how to expand designers' artistic palette wit...
AI Based Game Design - Teaching how to expand designers' artistic palette wit...Mirjam Eladhari
 
TCEA 2016 creating a game design sequence
TCEA 2016 creating a game design sequenceTCEA 2016 creating a game design sequence
TCEA 2016 creating a game design sequenceMike Ploor
 
A primer on game-based learning
A primer on game-based learningA primer on game-based learning
A primer on game-based learningGerard Friel
 
Niko Sévoz – Game designer
Niko Sévoz – Game designerNiko Sévoz – Game designer
Niko Sévoz – Game designerNiko S
 
Game Over? New Approaches to Teaching Engineering Courses
Game Over? New Approaches to Teaching Engineering CoursesGame Over? New Approaches to Teaching Engineering Courses
Game Over? New Approaches to Teaching Engineering CoursesJoaquim Jorge
 
Learning Analytics Serious Games Cognitive Disabilities
Learning Analytics Serious Games Cognitive DisabilitiesLearning Analytics Serious Games Cognitive Disabilities
Learning Analytics Serious Games Cognitive DisabilitiesBaltasar Fernández-Manjón
 
E adventure serious games as open reusable content ocwg
E adventure   serious games as open reusable content ocwgE adventure   serious games as open reusable content ocwg
E adventure serious games as open reusable content ocwgBaltasar Fernández-Manjón
 
Applying AI in Games (GDC2019)
Applying AI in Games (GDC2019)Applying AI in Games (GDC2019)
Applying AI in Games (GDC2019)Jun Okumura
 

Ähnlich wie Teaching AI through retro gaming (20)

Game Design as an Intro to Computer Science (Meaningful Play 2014)
Game Design as an Intro to Computer Science (Meaningful Play 2014)Game Design as an Intro to Computer Science (Meaningful Play 2014)
Game Design as an Intro to Computer Science (Meaningful Play 2014)
 
Fetc 2016 creating a game design sequence
Fetc 2016 creating a game design sequenceFetc 2016 creating a game design sequence
Fetc 2016 creating a game design sequence
 
CTE Video Game Programming Map 7th 12th
CTE Video Game Programming Map 7th 12thCTE Video Game Programming Map 7th 12th
CTE Video Game Programming Map 7th 12th
 
Claussen Windows and Game Programming 2 Syllabus
Claussen Windows and Game Programming 2 SyllabusClaussen Windows and Game Programming 2 Syllabus
Claussen Windows and Game Programming 2 Syllabus
 
Ahmed Hani Ibrahim
Ahmed Hani IbrahimAhmed Hani Ibrahim
Ahmed Hani Ibrahim
 
eMadrid Gaming4Coding - Possibilities of game learning analytics for coding l...
eMadrid Gaming4Coding - Possibilities of game learning analytics for coding l...eMadrid Gaming4Coding - Possibilities of game learning analytics for coding l...
eMadrid Gaming4Coding - Possibilities of game learning analytics for coding l...
 
AI Based Game Design - Teaching how to expand designers' artistic palette wit...
AI Based Game Design - Teaching how to expand designers' artistic palette wit...AI Based Game Design - Teaching how to expand designers' artistic palette wit...
AI Based Game Design - Teaching how to expand designers' artistic palette wit...
 
TCEA 2016 creating a game design sequence
TCEA 2016 creating a game design sequenceTCEA 2016 creating a game design sequence
TCEA 2016 creating a game design sequence
 
A primer on game-based learning
A primer on game-based learningA primer on game-based learning
A primer on game-based learning
 
Niko Sévoz – Game designer
Niko Sévoz – Game designerNiko Sévoz – Game designer
Niko Sévoz – Game designer
 
CV_NguyenHoaiNam_201510
CV_NguyenHoaiNam_201510CV_NguyenHoaiNam_201510
CV_NguyenHoaiNam_201510
 
Educon2016 12 04-2016
Educon2016  12 04-2016Educon2016  12 04-2016
Educon2016 12 04-2016
 
Game Over? New Approaches to Teaching Engineering Courses
Game Over? New Approaches to Teaching Engineering CoursesGame Over? New Approaches to Teaching Engineering Courses
Game Over? New Approaches to Teaching Engineering Courses
 
Learning Analytics Serious Games Cognitive Disabilities
Learning Analytics Serious Games Cognitive DisabilitiesLearning Analytics Serious Games Cognitive Disabilities
Learning Analytics Serious Games Cognitive Disabilities
 
Fernandez manjon
Fernandez manjonFernandez manjon
Fernandez manjon
 
E adventure serious games as open reusable content ocwg
E adventure   serious games as open reusable content ocwgE adventure   serious games as open reusable content ocwg
E adventure serious games as open reusable content ocwg
 
Applying AI in Games (GDC2019)
Applying AI in Games (GDC2019)Applying AI in Games (GDC2019)
Applying AI in Games (GDC2019)
 
Abdelrahman Al-Ogail Resume
Abdelrahman Al-Ogail ResumeAbdelrahman Al-Ogail Resume
Abdelrahman Al-Ogail Resume
 
Applying learning analytics in serious games
Applying learning analytics in serious games Applying learning analytics in serious games
Applying learning analytics in serious games
 
Stewart fecs2012
Stewart fecs2012Stewart fecs2012
Stewart fecs2012
 

Mehr von Diogo Gomes

Introdução ao git
Introdução ao gitIntrodução ao git
Introdução ao gitDiogo Gomes
 
The Things Network
The Things Network The Things Network
The Things Network Diogo Gomes
 
IEEEweek 2017 @ DETI Univ. Aveiro - Workshop Python
IEEEweek 2017 @ DETI Univ. Aveiro - Workshop PythonIEEEweek 2017 @ DETI Univ. Aveiro - Workshop Python
IEEEweek 2017 @ DETI Univ. Aveiro - Workshop PythonDiogo Gomes
 
Hack'Aveiro - 1º workshop - Introdução ao Arduino
Hack'Aveiro - 1º workshop - Introdução ao ArduinoHack'Aveiro - 1º workshop - Introdução ao Arduino
Hack'Aveiro - 1º workshop - Introdução ao ArduinoDiogo Gomes
 
IoT - Apps & Services
IoT - Apps & ServicesIoT - Apps & Services
IoT - Apps & ServicesDiogo Gomes
 
Conversas 2.0@sapo.labs - "svn+code.ua"
Conversas 2.0@sapo.labs - "svn+code.ua"Conversas 2.0@sapo.labs - "svn+code.ua"
Conversas 2.0@sapo.labs - "svn+code.ua"Diogo Gomes
 
Open Source & Research
Open Source & ResearchOpen Source & Research
Open Source & ResearchDiogo Gomes
 
Resource Optimizations for Broadcast enabled networks
Resource Optimizations for Broadcast enabled networksResource Optimizations for Broadcast enabled networks
Resource Optimizations for Broadcast enabled networksDiogo Gomes
 

Mehr von Diogo Gomes (9)

Introdução ao git
Introdução ao gitIntrodução ao git
Introdução ao git
 
The Things Network
The Things Network The Things Network
The Things Network
 
IEEEweek 2017 @ DETI Univ. Aveiro - Workshop Python
IEEEweek 2017 @ DETI Univ. Aveiro - Workshop PythonIEEEweek 2017 @ DETI Univ. Aveiro - Workshop Python
IEEEweek 2017 @ DETI Univ. Aveiro - Workshop Python
 
Rest workshop
Rest workshopRest workshop
Rest workshop
 
Hack'Aveiro - 1º workshop - Introdução ao Arduino
Hack'Aveiro - 1º workshop - Introdução ao ArduinoHack'Aveiro - 1º workshop - Introdução ao Arduino
Hack'Aveiro - 1º workshop - Introdução ao Arduino
 
IoT - Apps & Services
IoT - Apps & ServicesIoT - Apps & Services
IoT - Apps & Services
 
Conversas 2.0@sapo.labs - "svn+code.ua"
Conversas 2.0@sapo.labs - "svn+code.ua"Conversas 2.0@sapo.labs - "svn+code.ua"
Conversas 2.0@sapo.labs - "svn+code.ua"
 
Open Source & Research
Open Source & ResearchOpen Source & Research
Open Source & Research
 
Resource Optimizations for Broadcast enabled networks
Resource Optimizations for Broadcast enabled networksResource Optimizations for Broadcast enabled networks
Resource Optimizations for Broadcast enabled networks
 

Kürzlich hochgeladen

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 

Kürzlich hochgeladen (20)

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 

Teaching AI through retro gaming

  • 1. Teaching AI through retro gaming HOW TO MOTIVATE 21ST CENTURY STUDENTS THROUGH 20TH CENTURY GAMES
  • 2. Computer Science General shortage of CS Engineers worldwide Artificial Intelligence has gained an important momentum Yet very few students finish CS degrees
  • 3. What problems students tackle in introductory AI? TRAVELLING SALESMAN PROBLEM GOAL STACK PLANNING
  • 6. Why did you enroll in CS ? 0 50 100 150 200 250 Knowledge General Exp Use in another field Money Sit at computer Programming Computer Games Hardware Exp Friend in field Influences for CS Male Female Lori Carter. 2006. Why students with an apparent aptitude for computer science don't choose to major in computer science
  • 7. Games & AI • Games have traditionally been one the main research topics in AI • IBM Deepblue was a major landmark in AI research • So was Alpha Go – Google/Deepmind • Do students relate to Chess & Go ? • Not very popular when you are 20-21
  • 8. Computer Games WHEN STUDENTS THINK OF GAME AI THEY THINK OF: FIFA, CSGO, LOL, FORTNITE, PUBG
  • 9. Matching expectations AI is an introductory course for 3rd year students Students programming skills are average, but mostly centred in JAVA and Python Existing Game Engines place a large overhead and are not core to the course Frameworks such as OpenSpiel focus in advanced AI techniques (e.g. deeplearning) Simple games can be easily programmed and repurposed for learning objectives (card games, arcade games, Atari, NES)
  • 10. Running a live experiment After years using a robot simulator (CiberRato) in 2015/16 a first experiment: ◦ Development of Blackjack (cards) playing agents ◦ Students grade proportional to their agent performance (with minimum set of requirements to classify 10/20) ◦ Students could still do the CiberRato assignment from previous years ◦ Results: ◦ Almost all students opted for the Blackjack agent (despite existing code from previous years) ◦ Students were eager to improve their agents
  • 11. AI skills involved Minimax algorithm Monte-Carlo Simulation Bayesian Networks Some students actually went over the objectives and studied advanced AI algorithms to improve their agents
  • 12. Improving Grading was very complicated... ◦ ~70 agents that were required to play ~1000 games (to avoid impact of random events and luck) ◦ Agent/Game agent code tightly bound ◦ Agent was a simple Python Class object (students could temper with game engine, extra code review required)
  • 13. Retro fitting a retro game “Normal” games are not usually accessible to computer AI’s students They are monolithical The UI is bound to the execution environment They are not ready for automated evaluation.
  • 14. Snakes In 2016/17 we introduced “Snakes” (originally blockade) – made popular by Nokia Graphic Engine based on PyGame Decoupled Agent/UI code from Game Engine (Client-Server Architecture) One-on-One games Scoring based on ranking (used ATP rules)
  • 15. Snakes • Students could see “live action” • Deathmatch Snakes in 2016/17 • Collaborative Snakes in 2017/18
  • 16. Snake Some students improved the GUI Difficulties in training (lack of opponents) Synchronous engine meant game could stall due to bad AI algorithms. AI topics: Search algoritms A*, Greedy, Depth-First Jump-point-search Minimax
  • 17. Pac-Man • New asynchronous engine • Introduced in 2018/19
  • 18. Pac-Man Viewer is yet another client (can run the game headless) Students get creative, developing strategies to maximize scores (no longer simple path finding algorithms) AI Topics: Search algoritms A*, Greedy, Deapth-First Jump-point-search Minimax
  • 19. Bomberman • Based on previous year engine • Current edition (2019/20)
  • 20. Bomberman Server publicly shares high scores Students still contributing UI and develop new strategies AI Topics Planning Search algoritms A*, Greedy, Deapth-First Jump-point-search
  • 21. Going into detail HOW-TO MAKE A RETRO GAME ACCESSIBLE TO AI STUDENTS
  • 22. Architecture Games are implemented using a client-server architecture ◦ Server – runs the game logic ◦ Client – runs the AI agent ◦ Viewer – runs the GUI Server provides a websocket interface to both client’s and viewer’s pushing game state update asynchronously. ◦ Client updates the AI agent state and provides actions (key press) ◦ Viewers updates the screen Upon game over the server issues an HTTP POST to a score server containing information relevant for student grading (e.g. score, lives, time, steps, etc)
  • 23. Representation Model Students get access to the game state through JSON documents ◦ Easily parsable in Python ◦ Human readable (eases debugging) ◦ Well known technology Actions are those of humans ◦ Agents can press a key at any time through a JSON message containing a single key
  • 24. The role of Gamification A public high score table with KPI’s keeps student progress - Has everyone score minimum to pass? - How many have reached the end of the game - How intelligent is each agent based on KPI’s
  • 25. Open Source + GitHub The base Project is Open Source (MIT) ◦ https://github.com/dgomes/iia-ia-snakes ◦ https://github.com/dgomes/iia-ia-pacman ◦ https://github.com/dgomes/iia-ia-bomberman Students are encouraged to contribute (extra credits for new features) Evaluation is carried out through GitHub Classroom ◦ Each group has its own Project (private) ◦ On the deadline the GitHub Classroom collects all the code ◦ Server runs the games headless 10x
  • 26. Conclusion ◦ We didn’t invent any thing new: ◦ http://modelai.gettysburg.edu ◦ We did get students involved with games they never played before  ◦ Attention to class and time spent in the Project increased ◦ Our colleagues from other courses complained  ◦ Some students actually did the next year Project for fun. ◦ Motivation has clearly increased in class 
  • 27. Future ◦ This class opened a door for many of them ◦ Participation in hackatons such as Global Game Jam increased ◦ Student interest in developing games is high ◦ We need to attend to this interest (Lic, MSc, Phd?) ◦ Students already search for dissertation topics related to AI/Games ◦ Students planning in running their own hackatons.