24
The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Embed Size (px)

Citation preview

Page 1: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

The Poker Gamein Jadex

by

Group 1

Mohammed Musavi (Ashkan)

Xavi Dolcet

Enric Tejedor

Page 2: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Texas Hold’em

Poker•Scenario•Agent design•Jadex implementation detail•Demo

Page 3: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Texas Hold’em Poker

•Community card type poker •Typical full table has nine or ten player•Dealer position identifies with Button•At the casino a Croupier controls the

rounds•Identifying the winner at the

Showdown or when player Bluffs•Awarding the pot to the winner

Page 4: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Texas Hold’em PokerBetting rounds

• Pre-Flop (little & big blind, dealing cards - players actions: Call, Raise, Check and Fold)

• Flop (dealer burns a card – face up 3 cards)

• Turn (dealing fourth community card)• River (dealing fifth community card) Showdown if necessary

Page 5: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Texas Hold’em Poker

Poker Hand

Ranking

Page 6: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Texas Hold’em Poker

3 Strategies are implemented:

- Conservative gaming: ONLY high hands

- Aggressive gaming: medium/high hands

- Bluffer: all type of hands

Page 7: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Texas Hold’em Poker

Issues to consider

Game management:

•Register/unregister players

•Managing hand (i.e. card dealing, players turn, …)

•Showdown (identifying the winner)

Page 8: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Texas Hold’em Poker

Game rounds (pre-flop, flop, turn & river)

Betting process (call, raise, check, fold…)

Available roles in the game process (i.e. joining players or winner checking)

Game rules ( i.e. one dealer but several players, …)

Page 9: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Prometheus Design

Page 10: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

System specification

Page 11: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

System specification(2)

Page 12: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Architectural design

Page 13: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Detailed design: Croupier

Page 14: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Detailed design: Player

Page 15: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Implementation Details

Page 16: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Meta-level reasoning<metagoal name="choose_bet">

<parameterset name="applicables" .../><parameterset name="result" ... direction="out"/><trigger> <messageevent ref="bet_start"/>

</trigger></metagoal>...<plan name="choose_betting_plan">

<parameterset name="applicables" ...><goalmapping ref="choose_bet.applicables"/>

</parameterset><parameterset name="result" ... direction="out">

<goalmapping ref="choose_bet.result"/></parameterset><body>new ChooseBettingPlanPlan()</body><trigger> <goal ref="choose_bet"/> </trigger>

</plan>

Page 17: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

OQL syntax<plan name="notify_result">

<parameter name="loser" class="AgentId"><bindingoptions>

select AgentId $player from $beliefbase.table.getPlayers()

where !$goal.game_result.getWinners().contains($player)

</bindingoptions></parameter><parameter name="game_result" class="GameResult">

<value>$goal.game_result</value></parameter><body>new NotifyGameResultPlan()</body><trigger>

<goal ref="notify_result"/></trigger>

</plan>

Page 18: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Poker ontology

•Agents can’t acces others’ beliefs!

•Messages are used to exchange knowledge

•Content Language: NuggetsXML

•Ontology: Protégé + Beanynizer

Page 19: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Plan triggers

A plan can be activated by the following elements:- Events- Goals- Beliefs- Facts- Conditions

Page 20: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Demo

Page 21: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Final Analysis

Page 22: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Pros

•Fast learning curve (Java / XML)•Meta-level reasoning•Richness, expressivity, dinamicity• Goal-orientedness• Plan triggers• OQL Syntax

•Good set of tools•Ontologies

•Standalone /JADE

Page 23: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Cons

•No CASE tool to assist development•XML ADF files

•Tedious coding of message events•Stability issues•Scheduling mechanism

Page 24: The Poker Game in Jadex by Group 1 Mohammed Musavi (Ashkan) Xavi Dolcet Enric Tejedor

Conclusions

•Jadex is a recommendable BDI reasoning engine

•Good features, and some lacks that could be fixed

•Open source counterpart to JACK