View
0
Download
0
Category
Preview:
Citation preview
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 11
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 11
Artificial Intelligence Techniques in G
ames
with Incomplete Inform
ation
Opponent Modelling in Texas Hold'em
Dinis Félix
Mestrado Integrado em Engenharia Electrotécnica e de Computadores
Orientador: Professor Doutor Luís Paulo Reis
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 22
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 22
Sumário
�Introdução
�Objectivos
�Enquadramento
�OpponentModelling
�Projecto
�Resultados
�Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 33
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 33
Introdução
�Inteligência Artificial e Jogos
�Simplicidade e regras bem definidas
�Complexidade e variedade de estratégias
possíveis
�Tipo de jogos
�Informação perfeita ou imperfeita
�Determinísticos ou não determinísticos
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 44
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 44
Introdução
�Poker
�Jogo de informação imperfeita (jogadores não têm
informação sobre o jogo dos adversários)
�Jogo não determinístico (o factor aleatório é
introduzido no jogo através do acto de baralhar
cartas)
�Texas Hold’em
�Variante de Pokermais habitual na actualidade
�Regras simples
�Estratégia complexa
�Communitycardgame
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 55
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 55
Introdução
�Texas Hold’em
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 66
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 66
Introdução
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 77
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 77
Objectivos
�Contribuição no desenvolvimento de um agente
inteligente capaz de jogar Texas Hold’em
�Optimização de um software de simulação de
Poker
�Desenvolvimento de agentes capazes de simular
comportamento de jogadores humanos
�Desenvolvimento de um agente capaz de
adaptar a estratégia de jogo em função do
comportamento dos adversários –Opponent
Modelling
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 88
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 88
Enquadramento
�Texas Hold’em simulator
•Desenvolvido em C/C++
•Ligação cliente-servidor
através de sockets
•Protocolo universal -
possibilidade de participar
na 2008 AAAI Poker
Competition
•Simulação automática de
uma sessão de jogo
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 99
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 99
Enquadramento
�University of Alberta Computer Poker Research Group
�Estratégia de decisão pré-flop
�Income Rate Value
�Resultado de simulações com as 1326 combinações
possíveis de duas cartas
�Decisão da aposta em função do valor obtido
�Estratégia de decisão pós-flop
�HandStrength
�PotentialHandStrength
�EffectiveHandStrength
�OpponentModelling
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 10
10
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 10
10
Enquadramento
�Hand Strength Calculation
HandStrength(ourcards, boardcards)
{
ahead = tied = behind = 0
ourrank= Rank(ourcards, boardcards)
/* Consider all two-card combinations of the remaining cards. */
for each case(oppcards)
{
opprank= Rank(oppcards, boardcards)
if (ourrank>opprank) ahead += 1
else if (ourrank==opprank) tied += 1
else behind += 1
}
handstrength= (ahead+tied/2) / (ahead+tied+behind)
return(handstrength)
}
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 11
11
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 11
11
Enquadramento
�Hand Potential Strength Calculation
�CálculosemelhanteaoHand Strength
�Considera-se tambémas todasas possibilidadesde
cartasqueirãosairno turn e river
�Effective Hand Strength Calculation
�Pr(win) = Pr(ahead) x Pr(oppnot improve) + Pr(behind) x Pr(weImprove)
�Pr(win) = HS x (1 -NPot) + (1 -HS) x PPot
�EHS = HS + (1 x HS) x PPot
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 12
12
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 12
12
OpponentModelling
�Classificação de adversários
�VP$IP –VoluntaryPutMoney InPot
�AF –AgressionFactor
�Tipo de jogadores
�LooseAggressive
�LoosePassive
�TightAggressive
�TightPassive
Introdução| Objectivos| Enquadramento| Opponent Modelling| Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 13
13
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 13
13
OpponentModelling
Sklanskygroups
�Valor das duas cartas iniciais
agrupados em 8 grupos
�Comprovados por um modelo
computacional –Income
RatedValues
�Permite relacionar tipos de
jogadores e cartas escolhidas
para entrar em jogo
Introdução| Objectivos| Enquadramento| Opponent Modelling| Projecto| Resultados| Conclusões
all the other 2 cards combination
Group 8:
87 53s A9 Q9 76s 42s 32s 96s 85s J8
J7s 65 54 74s K9 T8 76 65s 54s 86s
Group 7:
66 J8s 98s T8s 55 J9 43s 75s T9 33 98
64s 44 K8s K7s K6s K5s K4s K3s
K2s Q8s 22 87s 97s
Group 6:
77 Q9s KJ QJ JT A7s A6s A5s A4s A3s
A2s J9s T9s K9s KT QT
Group 5:
A8s KQ 88 QTsA9s AT AJ JTs
Group 4:
99 KTs QJs KJs ATs AQ
Group 3:
TT AQsAJsKQsAK
Group 2:
AA KKQQ JJ AKs
Group 1:
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 14
14
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 14
14
OpponentModelling
Relação jogador e escolha de mãos
Introdução| Objectivos| Enquadramento| Opponent Modelling| Projecto| Resultados| Conclusões
Raisesem quase todas as mãos do grupo 1 a 5 e uma pequena
percentagem em grupos mais baixos
Aggressive
Raisesmaioritariamente nos grupos 1 e 2, apenas uma pequena
percentagem nos grupos 3,4 e 5; muito raramente em grupos mais
baixos
Passive
Jogam maioritariamente mãos do grupo 1 a 3 e uma pequena
percentagem dos restantes
Tight
Jogam quase todas as mãos do grupo 1 a 5 e algumas dos restantes
grupos
Loose
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 15
15
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 15
15
Projecto
�Desenvolvimento de 8
agentes inteligentes
�2 looseaggressives
(gamblerandmaniac)
�2 loosepassives(fish
andcallingstation)
�2 tightaggressives
(foxandace)
�2 tightpassives(rock
andweaktight)
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Desenvolvimento de um agente inteligente observador capaz de
utilizar técnicas de OpponentModelling
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 16
16
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 16
16
Projecto
Group8
Call
20%
Fold
80%
Call
20%
Fold
80%
Raise
10%
Call
10%
Fold
90%
Raise
10%
Call
10%
Fold
90%
Group7
Raise
10%
Fold
90%
Group6
Group5
Raise
20%
Call
10%
Fold
70%
Raise
30%
Call
10%
Fold
70%
Call
70%
Fold
30%
Raise
10%
Call
40%
Fold
50%
Raise
50%
Call
30%
Fold
20%
Raise
30%
Call
30%
Fold
40%
Group4
Raise
Raise
Group3
Raise
90%
Call
10%
Raise
90%
Call
10%
Raise
50%
Call
30%
Fold
20%
Raise
70%
Call
20%
Fold
10%
Raise
20%
Call
60%
Fold
20%
Raise
10%
Fold
90%
Raise
Raise
Group2
Raise
Raise
Raise
Raise
Raise
Raise
90%
Call
10%
Raise
Raise
Group1
Ace
Fox
Weak
Tight
Rock
Calling
Station
Fish
Maniac
Gambler
Pre-flopstrategy
•Valores obtidos através de
várias simulações de forma a
garantir que os agentes
mantinham os valores VP$IP e
AF pretendidos
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Pos-flopstrategy
•Todos os agentes assumem a
mesma estratégia depois do flop
•Cálculo de EffectiveHand
Strength •Raise(EHS >= 0.8)
•Call(0.5 <= EHS < 0.8 )
•Fold(EHS < 0.5)
�8 Agentes Inteligentes
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 17
17
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 17
17
Projecto
�Guarda informação sobre
todos os movimentos dos
adversários
�Analisa a informação
recolhida e actualiza
constantemente o VP$IP e AF
de cada jogador
�Detecta quais os jogadores
que se encontram em jogo e
classifica-os
Tight Aggressive
(classification4)
Tight Passive
(classification3)
VP%IP<28%
Loose Aggressive
(classification2)
Loose Passive
(classification1)
VP$IP>=28%
AF>1
AF<=1
�Calcula EffectiveHandStrengthem função de cada um dos
adversários que se encontram em jogo
�Desenvolvimento de 1 agente observador
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 18
18
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 18
18
Projecto
�Reformulação do cálculo de EffectiveHandStrength
�Determinação de um parâmetro que representa o
menor valor provável das duas cartas do adversário –
deu-se o nome Sklansky
�Cálculo de HandStrengthe HandPotentialStrength
excluindo todas as combinações com valor menor que o
parâmetro Sklansky
�Cálculo de EffectiveHandStrengthpor adversário em
jogo
�EHSi= HSi+ (1 -HSi) x PPoti
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 19
19
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 19
19
Projecto
HandStrength(ourcards,boardcards, player_classification)
{
ahead = tied = behind = 0
ourrank= Rank(ourcards,boardcards)
/* Consider all two-card combinations of the remaining cards. */
for each case(oppcards)
{
if(oppcardsbelong to player_starting_hands_range)
{ opprank= Rank(oppcards,boardcards)
if(ourrank>opprank) ahead += 1
else if(ourrank==opprank) tied += 1
else behind += 1
}
} handstrength= (ahead+tied/2) / (ahead+tied+behind)
return(handstrength)
}
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 20
20
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 20
20
Resultados
Maniac
Player 8
Ace
Player 7
Calling station
Player 6
Fox
Player 5
Weak-tight
Player 4
Fish
Player 3
Rock
Player 2
Gambler
Player 1
Observer
Player 0
Player
Position
Experiências:
•12 simulações em mesas de 9 jogadores
•1 agente observador e 8 agentes regulares
•Agente observador adopta 4 estratégias
diferentes na escolha da estratégia pré-flop
•Simulações 1 a 3 –observador Gambler
•Simulações 4 a 6 –observador CallingStation
•Simulações 7 a 9 –observador Fox
•Simulações 10 a 12 –observador Rock
•Cada uma das simulações termina quando o
observador ou o agente com a estratégia
semelhante perder ou a partida chegar ao jogo
2000
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 21
21
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 21
21
Resultados
Observador Gambler
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
0
500
1000
1500
2000
2500
3000
3500
182
163
244
325
406
487
568
649
730
811
892
9731054113512161297137814591540162117021783186419452026
number of games
bankroll
Observer
Gambler
0
500
1000
1500
2000
2500
3000
3500
124
47
70
93116139162185208231254277300323346369392415438461484507530553576599622645668691714737
number of games
bankroll
observer
gambler
0
200
400
600
800
1000
1200
1400
1600
1800
2000
110
19
28
37
46
55
64
73
82
91100109118127136145154163172181190199208217226235244253262
number of games
bankroll
observer
gambler
•Resultados inconclusivos na 1ª
simulação
•Agente não-observadorperde
rapidamente nas simulações 2 e 3
•Observador demonstra melhor
reultadosno geral
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 22
22
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 22
22
Resultados
Observador CallingStation
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
0
1000
2000
3000
4000
5000
6000
148
95
142
189
236
283
330
377
424
471
518
565
612
659
706
753
800
847
894
941
988103510821129
number of games
bankroll
observer
calling station
0
1000
2000
3000
4000
5000
6000
127
53
79105131157183209235261287313339365391417443469495521547573599625651677703729755781807
number of games
bankroll
observer
calling station
0
200
400
600
800
1000
1200
1400
1600
1800
116
31
46
61
76
91106121136151166181196211226241256271286301316331346361376391406421436451466
number of games
bankroll
observer
calling station
•Observador demonstra melhor
desempenho em todos os casos
•Em duas das simulações atinge
valores bastante elevados
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 23
23
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 23
23
Resultados
Observador Fox
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
0
500
1000
1500
2000
2500
3000
3500
4000
111
21
31
41
51
61
71
81
91101111121131141151161171181191201211221231241251261271281291301311321
number of games
bankroll
observer
fox
0
500
1000
1500
2000
2500
147
93
139
185
231
277
323
369
415
461
507
553
599
645
691
737
783
829
875
921
9671013105911051151
number of games
bankroll
observer
fox
0
200
400
600
800
1000
1200
110
19
28
37
46
55
64
73
82
91100109118127136145154163172181190199208217226235244253262271280
number of games
bankroll
observer
fox
•Ambos os agentes não se mantêm
em jogo durante muito tempo em
duas simulações
•Agente observador demonstra
aguentar mais e obtém bons
resultados numa das simulações
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 24
24
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 24
24
Resultados
Observador Rock
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
0
200
400
600
800
1000
1200
1400
1600
1800
19
17
25
33
41
49
57
65
73
81
89
97105113121129137145153161169177185193201209217225233241
number of games
bankroll
observer
rock
0
500
1000
1500
2000
2500
3000
3500
1129
257
385
513
641
769
897102511531281140915371665179319212049217723052433256126892817294530733201
number of games
bankroll
observer
rock
0
500
1000
1500
2000
2500
3000
3500
156
111
166
221
276
331
386
441
496
551
606
661
716
771
826
881
936
9911046110111561211126613211376
number of games
bankroll
observer
rock
•Ambos os agentes demonstram
capacidade para continuar em jogo
durante muito tempo
•Agente observador demonstra
melhor desempenho em todos os
casos
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 25
25
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 25
25
Resultados
�12 testes –mais de 10 000 jogos simulados
�Agente observador demonstra melhor performance do
que um agente não observador com o mesmo critério de
escolhas pré-flop
�Resultados mais conclusivos em agentes passivos
�Agentesagressivos demonstram manter-se mais tempo
em jogo quando são observadores
�Software de simulação apresenta estabilidade e
fiabilidade para trabalhos futuros
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 26
26
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 26
26
Conclusões
�Agentes representam o comportamento humano
pretendido
�Técnicas de classificação demonstraram ser
eficazes ao classificar os adversários em 4
grupos distintos
�Resultadoscomprovam que as técnicas de
OpponentModelingdesenvolvidas são benéficas
para o desempenho do jogo
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Coordination Methodologies applied to Robotic Soccer,
Coordination Methodologies applied to Robotic Soccer, Guimarães
Guimarães, Portugal
, Portugal 27
27
Artificial Intelligence Techniques in Games with Incomplete Info
Artificial Intelligence Techniques in Games with Incomplete Information
rmation 27
27
Conclusões
�Trabalhos futuros
�Explorar outros tópicos do jogo:
�Posição
�Bluff e trapping
�Optimização de apostas
�A abordagem deste projecto pode ser optimizada:
�Considerar mais tipos de jogadores
�Analisar outros parâmetros além de VP$IP e AF
�Aproveitar a informação sobre as cartas do adversário que
são mostradas para comprovar resultados e definir novas
estratégias
�Examinar padrões na estratégia de apostas pós-flop
Introdução| Objectivos| Enquadramento| Opponent Modelling | Projecto| Resultados| Conclusões
Recommended