SlideShare una empresa de Scribd logo
1 de 8
Descargar para leer sin conexión
Chowka Bhara – Game of Dice
                                         Objective
                            “To implement an optimal strategy for a
                            computer player in this partly stochastic,
                                 partly strategic Game of Dice”

                           References of this game are in some ancient Indian
                                      epics like the Mahabharata

                          Rules
                          • Dice values: 1, 2, 3, 4, 8
Setup                     • Hit: Pawn hit goes back ‘Home’
• 5 x 5 board             • Safe houses: Pawns cannot get ‘Hit’ here (X)
• 2 – 4 player game       • Double: 2 pawns of same player in the same
• 4 pawns per player         box. Opponent pawns cannot move beyond
• Objective:     All 4       this Double. A Double can ‘hit’ a single pawn
   pawns reach the goal      but a single pawn cannot ‘hit’ a Double.
   square
Related Work

   Several variations of the game online implemented as Java Applets and
    NodeJS without AI Component
   Flash implementation with a weighted tree mechanism
   MINIMAX: A classical adversarial search algorithm typically used for two-
    player zero-sum games.
   EXPECTIMINIMAX: An extension of MINIMAX taking into account the
    element of chance.
   CHANCEPROBCUT: Pruning of chance nodes, applied in a partially
    observable game like Stratego.
   Improved alpha-beta pruning of heuristic search in Game trees
Approach – Selecting a Pawn
   Naive Agent A1: Weighted tree approach
   Intelligent Agent A2: using EXPECTIMINIMAX algorithm




   Random Agent A3
Approach – Defining Heuristics
Factors Considered                        Heuristic Functions
   F1: Will moving of this pawn hit       An attacking strategy
    an opponents pawn?                      H1: w1 * f1+w2 * f2; w1 > w2
   F2: Will the pawn move onto a
                                             H2: (w1 * f1 + w3 * f3) * f7 / f5;
    safe house?
                                              w3 = distance of the closest
   F3: Will the pawn be out-of-reach         opponent pawn
    of an opponent?
   F4: Will it result in the formation      H3: f1 / f6
    of a double?                              Tradeoff between an attacking
   F5: The closeness of the pawn in          and defensive strategy,
    reaching the goal
                                             H4: (w1* f1 + w2 * f2 + w3 * f3)
   F6: The closeness of a pawn in            / (w5 * f5 + w6 * f6)
    reaching the safesquare                   w1> w2 > w3.
   F7: Number of remaining pawns             w6 < w5
    on the board for the player               Holistic Heuristic
Results & Interpretation: Algorithms
        Table I: Intelligent vs. Random                             Table II: Naïve vs. Random
Heuristic Intelligent Random            Moves              Heuristic    Naïve       Random     Moves
  H1             44            6         113                 H1           43            7       116
  H2             40           10         107                 H2           43            7       102
  H3             37           13         121                 H3           31            19      142
  H4             47            3         111                 H4           41            9       117

                     AI agents trump Random Agent!
   Avg. Moves(games won by AI) << Avg. Moves(games won by Random) =>
                         Random wins by chance

                                    Table III: Intelligent vs. Naïve
                          Heuristic   Intelligent        Naïve         Moves
                            H1            25               25           118
                            H2            22               28           100
                            H3            40               10           164
                            H4            27               23           117

• Is a search algorithm better than a weighted tree approach? YES!
• Will the Intelligent Agent be able to perform better if it is able to look
  deeper into the game tree? By extrapolation:YES!
Results & Interpretation: Heuristics
 Table IV: Naive vs. Naïve for each heuristic
Player 1 Player 2 P1 won P2 won Moves
   H1       H2        27        23      116
   H1       H3        42         8      163         • Heuristics that combine
   H1       H4        33        17      116           attacking and defensive
   H2       H3        36        14      126           strategies perform better than
   H2       H4        31        19      112           purely attacking/defensive
   H3       H4        16        34      138
                                                      strategies
              H1>H2>H4>H3
                                                    • Weights really matter!
    Table V: Intelligent vs. Intelligent for each
                      heuristic                     • It is possible to achieve higher
  Player 1 Player 2 P1 won P2 won Moves
                                                      winning rates by altering the
     H1        H2        28          22       139
     H1        H3        33          17       170     weights
     H1        H4        32          18       146
     H2        H3        26          24       120
     H2        H4        23          27       114
     H3        H4        27          23       126

              H1>(H2~H4~H3)
Results & Interpretation:
     Time & Space
           Table VI: Time taken/move
         Algorithm       Time/move (in ms)
            A1                   9.3
            A2                 198.12
            A3                    0

       Branching Factor: 4 *5 = 20

   Time and Space Complexity ~ O(b^d)

      Table VII: Number of nodes expanded
       Algorithm         No. of nodes expanded
           A1                       4
           A2             4*(4*5)*(4*5) = 1600
           A3                       0
Future Work & References
   Extend algorithm for 4 player game
   Construct an algorithm that learns the probabilities of winning against the
    various sequences of dice values generated and alter the weights of the
    heuristics based on its learning set, similar to a neural net or a genetic
    algorithm.

References
[1] Dhanan Sekhar Edathara (2012) Flash implementation of a variation of Chowka Bhara
[Online]. Available: http://kavidikali.com/making/
[2] Russell, Stuart J.; Norvig, Peter (2010), Artificial Intelligence: A Modern Approach (3rd ed.),
Upper Saddle River, New Jersey: Prentice Hall, pp. 165-167, ISBN 0-13-604259-7
[3] Russell, Stuart J.; Norvig, Peter (2010), Artificial Intelligence: A Modern Approach (3rd ed.),
Upper Saddle River, New Jersey: Prentice Hall, pp. 177-180, ISBN 0-13-604259-7
[4] Schadd, M.P.D.; Winands, M.H.M.; Uiterwijk, J.W.H.M.; , ”CHANCEPROBCUT: Forward pruning
in chance nodes,” Computational Intelligence and Games, 2009. CIG 2009. IEEE Symposium on ,
vol., no., pp.178-185, 7-10 Sept. 2009.
[5] Zhang Congpin; Cui-Jinling; , ”Improved Alpha-Beta Pruning of Heuristic Search in Game-
Playing Tree,” Computer Science and Information Engineering, 2009 WRI World Congress on ,
vol.2, no., pp.672-674, March 31 2009-April 2 2009

Más contenido relacionado

Destacado

Baccetti tx timing_for_twin_block_therapy
Baccetti tx timing_for_twin_block_therapyBaccetti tx timing_for_twin_block_therapy
Baccetti tx timing_for_twin_block_therapyConsultório Particular
 
Asiakkaan Kohtaaminen
Asiakkaan KohtaaminenAsiakkaan Kohtaaminen
Asiakkaan KohtaaminenDarwin Oy
 
CambridgeIP Webinar: Developing a fact Based IP Strategy
CambridgeIP Webinar: Developing a fact Based IP StrategyCambridgeIP Webinar: Developing a fact Based IP Strategy
CambridgeIP Webinar: Developing a fact Based IP StrategyCambridgeIP Ltd
 
Goodrich Global Corporate Profile
Goodrich Global Corporate ProfileGoodrich Global Corporate Profile
Goodrich Global Corporate ProfileGoodrich Global
 
Voita peli verkossa: Parempia asiakkaita verkkopalvelun optimoinnilla
Voita peli verkossa: Parempia asiakkaita verkkopalvelun optimoinnillaVoita peli verkossa: Parempia asiakkaita verkkopalvelun optimoinnilla
Voita peli verkossa: Parempia asiakkaita verkkopalvelun optimoinnillaDarwin Oy
 
Economics of Green Growth & National Innovation Strategies
Economics of Green Growth & National Innovation StrategiesEconomics of Green Growth & National Innovation Strategies
Economics of Green Growth & National Innovation StrategiesCambridgeIP Ltd
 
Comenius IES La Arboleda in Greece 2012
Comenius IES La Arboleda in Greece 2012Comenius IES La Arboleda in Greece 2012
Comenius IES La Arboleda in Greece 2012Rocio Torres
 
Goodrich Global Achievements
Goodrich Global AchievementsGoodrich Global Achievements
Goodrich Global AchievementsGoodrich Global
 
E11 Physics Evaluation Sheet
E11 Physics Evaluation SheetE11 Physics Evaluation Sheet
E11 Physics Evaluation Sheetguest411ccf79
 
CambridgeIP: IP Data as a source of Business Intelligence
CambridgeIP: IP Data as a source of Business IntelligenceCambridgeIP: IP Data as a source of Business Intelligence
CambridgeIP: IP Data as a source of Business IntelligenceCambridgeIP Ltd
 
GG中国香港职员拓展活动
GG中国香港职员拓展活动GG中国香港职员拓展活动
GG中国香港职员拓展活动Goodrich Global
 
Luova Ajattelu
Luova AjatteluLuova Ajattelu
Luova AjatteluDarwin Oy
 

Destacado (20)

Kesejahteraan1
Kesejahteraan1Kesejahteraan1
Kesejahteraan1
 
Baccetti tx timing_for_twin_block_therapy
Baccetti tx timing_for_twin_block_therapyBaccetti tx timing_for_twin_block_therapy
Baccetti tx timing_for_twin_block_therapy
 
Analogical thinking
Analogical thinkingAnalogical thinking
Analogical thinking
 
Asiakkaan Kohtaaminen
Asiakkaan KohtaaminenAsiakkaan Kohtaaminen
Asiakkaan Kohtaaminen
 
CambridgeIP Webinar: Developing a fact Based IP Strategy
CambridgeIP Webinar: Developing a fact Based IP StrategyCambridgeIP Webinar: Developing a fact Based IP Strategy
CambridgeIP Webinar: Developing a fact Based IP Strategy
 
Grand strategy
Grand strategyGrand strategy
Grand strategy
 
Goodrich Global Corporate Profile
Goodrich Global Corporate ProfileGoodrich Global Corporate Profile
Goodrich Global Corporate Profile
 
WWF-2014-png.pptx
WWF-2014-png.pptxWWF-2014-png.pptx
WWF-2014-png.pptx
 
Voita peli verkossa: Parempia asiakkaita verkkopalvelun optimoinnilla
Voita peli verkossa: Parempia asiakkaita verkkopalvelun optimoinnillaVoita peli verkossa: Parempia asiakkaita verkkopalvelun optimoinnilla
Voita peli verkossa: Parempia asiakkaita verkkopalvelun optimoinnilla
 
Economics of Green Growth & National Innovation Strategies
Economics of Green Growth & National Innovation StrategiesEconomics of Green Growth & National Innovation Strategies
Economics of Green Growth & National Innovation Strategies
 
Curvess I&E
Curvess I&ECurvess I&E
Curvess I&E
 
Comenius IES La Arboleda in Greece 2012
Comenius IES La Arboleda in Greece 2012Comenius IES La Arboleda in Greece 2012
Comenius IES La Arboleda in Greece 2012
 
Picture Essay
Picture EssayPicture Essay
Picture Essay
 
Ch25
Ch25Ch25
Ch25
 
Periodesystemet
PeriodesystemetPeriodesystemet
Periodesystemet
 
Goodrich Global Achievements
Goodrich Global AchievementsGoodrich Global Achievements
Goodrich Global Achievements
 
E11 Physics Evaluation Sheet
E11 Physics Evaluation SheetE11 Physics Evaluation Sheet
E11 Physics Evaluation Sheet
 
CambridgeIP: IP Data as a source of Business Intelligence
CambridgeIP: IP Data as a source of Business IntelligenceCambridgeIP: IP Data as a source of Business Intelligence
CambridgeIP: IP Data as a source of Business Intelligence
 
GG中国香港职员拓展活动
GG中国香港职员拓展活动GG中国香港职员拓展活动
GG中国香港职员拓展活动
 
Luova Ajattelu
Luova AjatteluLuova Ajattelu
Luova Ajattelu
 

Más de Arvind Krishnaa

Twitter Agreement Analysis
Twitter Agreement AnalysisTwitter Agreement Analysis
Twitter Agreement AnalysisArvind Krishnaa
 
Recognition of unistroke gesture sequences
Recognition of unistroke gesture sequencesRecognition of unistroke gesture sequences
Recognition of unistroke gesture sequencesArvind Krishnaa
 
Human Altruism and Cooperation
Human Altruism and CooperationHuman Altruism and Cooperation
Human Altruism and CooperationArvind Krishnaa
 
Final review presentation
Final review presentationFinal review presentation
Final review presentationArvind Krishnaa
 
Third review presentation
Third review presentationThird review presentation
Third review presentationArvind Krishnaa
 
Second review presentation
Second review presentationSecond review presentation
Second review presentationArvind Krishnaa
 
Zeroth review presentation - eBay Turmeric / SMC
Zeroth review presentation - eBay Turmeric / SMCZeroth review presentation - eBay Turmeric / SMC
Zeroth review presentation - eBay Turmeric / SMCArvind Krishnaa
 
Canvas Based Presentation - Zeroth Review
Canvas Based Presentation - Zeroth ReviewCanvas Based Presentation - Zeroth Review
Canvas Based Presentation - Zeroth ReviewArvind Krishnaa
 
Smart camera monitoring system
Smart camera monitoring systemSmart camera monitoring system
Smart camera monitoring systemArvind Krishnaa
 
Unix Shell and System Boot Process
Unix Shell and System Boot ProcessUnix Shell and System Boot Process
Unix Shell and System Boot ProcessArvind Krishnaa
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of AlgorithmsArvind Krishnaa
 

Más de Arvind Krishnaa (14)

Twitter Agreement Analysis
Twitter Agreement AnalysisTwitter Agreement Analysis
Twitter Agreement Analysis
 
Recognition of unistroke gesture sequences
Recognition of unistroke gesture sequencesRecognition of unistroke gesture sequences
Recognition of unistroke gesture sequences
 
Human Altruism and Cooperation
Human Altruism and CooperationHuman Altruism and Cooperation
Human Altruism and Cooperation
 
Canscape
CanscapeCanscape
Canscape
 
Final review presentation
Final review presentationFinal review presentation
Final review presentation
 
Third review presentation
Third review presentationThird review presentation
Third review presentation
 
Second review presentation
Second review presentationSecond review presentation
Second review presentation
 
Zeroth review presentation - eBay Turmeric / SMC
Zeroth review presentation - eBay Turmeric / SMCZeroth review presentation - eBay Turmeric / SMC
Zeroth review presentation - eBay Turmeric / SMC
 
Canvas Based Presentation - Zeroth Review
Canvas Based Presentation - Zeroth ReviewCanvas Based Presentation - Zeroth Review
Canvas Based Presentation - Zeroth Review
 
Smart camera monitoring system
Smart camera monitoring systemSmart camera monitoring system
Smart camera monitoring system
 
Marine Pollution
Marine PollutionMarine Pollution
Marine Pollution
 
Unix Shell and System Boot Process
Unix Shell and System Boot ProcessUnix Shell and System Boot Process
Unix Shell and System Boot Process
 
Multithreading Concepts
Multithreading ConceptsMultithreading Concepts
Multithreading Concepts
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of Algorithms
 

Último

What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 

Último (20)

What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 

Chowka bhara

  • 1. Chowka Bhara – Game of Dice Objective “To implement an optimal strategy for a computer player in this partly stochastic, partly strategic Game of Dice” References of this game are in some ancient Indian epics like the Mahabharata Rules • Dice values: 1, 2, 3, 4, 8 Setup • Hit: Pawn hit goes back ‘Home’ • 5 x 5 board • Safe houses: Pawns cannot get ‘Hit’ here (X) • 2 – 4 player game • Double: 2 pawns of same player in the same • 4 pawns per player box. Opponent pawns cannot move beyond • Objective: All 4 this Double. A Double can ‘hit’ a single pawn pawns reach the goal but a single pawn cannot ‘hit’ a Double. square
  • 2. Related Work  Several variations of the game online implemented as Java Applets and NodeJS without AI Component  Flash implementation with a weighted tree mechanism  MINIMAX: A classical adversarial search algorithm typically used for two- player zero-sum games.  EXPECTIMINIMAX: An extension of MINIMAX taking into account the element of chance.  CHANCEPROBCUT: Pruning of chance nodes, applied in a partially observable game like Stratego.  Improved alpha-beta pruning of heuristic search in Game trees
  • 3. Approach – Selecting a Pawn  Naive Agent A1: Weighted tree approach  Intelligent Agent A2: using EXPECTIMINIMAX algorithm  Random Agent A3
  • 4. Approach – Defining Heuristics Factors Considered Heuristic Functions  F1: Will moving of this pawn hit  An attacking strategy an opponents pawn? H1: w1 * f1+w2 * f2; w1 > w2  F2: Will the pawn move onto a  H2: (w1 * f1 + w3 * f3) * f7 / f5; safe house? w3 = distance of the closest  F3: Will the pawn be out-of-reach opponent pawn of an opponent?  F4: Will it result in the formation  H3: f1 / f6 of a double? Tradeoff between an attacking  F5: The closeness of the pawn in and defensive strategy, reaching the goal  H4: (w1* f1 + w2 * f2 + w3 * f3)  F6: The closeness of a pawn in / (w5 * f5 + w6 * f6) reaching the safesquare w1> w2 > w3.  F7: Number of remaining pawns w6 < w5 on the board for the player Holistic Heuristic
  • 5. Results & Interpretation: Algorithms Table I: Intelligent vs. Random Table II: Naïve vs. Random Heuristic Intelligent Random Moves Heuristic Naïve Random Moves H1 44 6 113 H1 43 7 116 H2 40 10 107 H2 43 7 102 H3 37 13 121 H3 31 19 142 H4 47 3 111 H4 41 9 117 AI agents trump Random Agent! Avg. Moves(games won by AI) << Avg. Moves(games won by Random) => Random wins by chance Table III: Intelligent vs. Naïve Heuristic Intelligent Naïve Moves H1 25 25 118 H2 22 28 100 H3 40 10 164 H4 27 23 117 • Is a search algorithm better than a weighted tree approach? YES! • Will the Intelligent Agent be able to perform better if it is able to look deeper into the game tree? By extrapolation:YES!
  • 6. Results & Interpretation: Heuristics Table IV: Naive vs. Naïve for each heuristic Player 1 Player 2 P1 won P2 won Moves H1 H2 27 23 116 H1 H3 42 8 163 • Heuristics that combine H1 H4 33 17 116 attacking and defensive H2 H3 36 14 126 strategies perform better than H2 H4 31 19 112 purely attacking/defensive H3 H4 16 34 138 strategies H1>H2>H4>H3 • Weights really matter! Table V: Intelligent vs. Intelligent for each heuristic • It is possible to achieve higher Player 1 Player 2 P1 won P2 won Moves winning rates by altering the H1 H2 28 22 139 H1 H3 33 17 170 weights H1 H4 32 18 146 H2 H3 26 24 120 H2 H4 23 27 114 H3 H4 27 23 126 H1>(H2~H4~H3)
  • 7. Results & Interpretation: Time & Space Table VI: Time taken/move Algorithm Time/move (in ms) A1 9.3 A2 198.12 A3 0 Branching Factor: 4 *5 = 20 Time and Space Complexity ~ O(b^d) Table VII: Number of nodes expanded Algorithm No. of nodes expanded A1 4 A2 4*(4*5)*(4*5) = 1600 A3 0
  • 8. Future Work & References  Extend algorithm for 4 player game  Construct an algorithm that learns the probabilities of winning against the various sequences of dice values generated and alter the weights of the heuristics based on its learning set, similar to a neural net or a genetic algorithm. References [1] Dhanan Sekhar Edathara (2012) Flash implementation of a variation of Chowka Bhara [Online]. Available: http://kavidikali.com/making/ [2] Russell, Stuart J.; Norvig, Peter (2010), Artificial Intelligence: A Modern Approach (3rd ed.), Upper Saddle River, New Jersey: Prentice Hall, pp. 165-167, ISBN 0-13-604259-7 [3] Russell, Stuart J.; Norvig, Peter (2010), Artificial Intelligence: A Modern Approach (3rd ed.), Upper Saddle River, New Jersey: Prentice Hall, pp. 177-180, ISBN 0-13-604259-7 [4] Schadd, M.P.D.; Winands, M.H.M.; Uiterwijk, J.W.H.M.; , ”CHANCEPROBCUT: Forward pruning in chance nodes,” Computational Intelligence and Games, 2009. CIG 2009. IEEE Symposium on , vol., no., pp.178-185, 7-10 Sept. 2009. [5] Zhang Congpin; Cui-Jinling; , ”Improved Alpha-Beta Pruning of Heuristic Search in Game- Playing Tree,” Computer Science and Information Engineering, 2009 WRI World Congress on , vol.2, no., pp.672-674, March 31 2009-April 2 2009