Effective hand strength algorithm: Difference between revisions

Content deleted Content added
m Dating citation
 
(27 intermediate revisions by 21 users not shown)
Line 1:
{{Short description|Poker algorithm published in 1998}}
{{Multiple issues|
{{More citations needed|date=April 2013}}
'''Effective Hand Strength (EHS)''' is a poker algorithm conceived by [[computer scientists]] [[Darse Billings]], [[Denis Papp]], [[Jonathan Schaeffer]] and [[Duane Szafron]] that has beenwas published for the first time in athe {{cite journal | last1 = research paper | url=http://www.cs.virginia.edu/~evans/poker/wp-content/uploads/2011/02/opponent_modeling_in_poker_billings.pdf | title=Opponent Modeling in Poker | journal=AAAI-98 Proceedings| year = 1998}}
 
It has since then been considered as a reference in the realm of Pokerpoker Artificialartificial Intelligenceintelligence and has been the basis of further research such as:
{{Orphan|date=February 2013}}
* {{cite journal |last1=Rubin |first1=Jonathan |last2=Watson |first2=Ian |title=Computer poker: A review |journal=Artificial Intelligence |date=April 2011 |volume=175 |issue=5–6 |pages=958–987 | url= http://www.cs.auckland.ac.nz/~ian/papers/AIJournal.pdf |doi=10.1016/j.artint.2010.12.005}}
}}
* {{cite thesis |last=Schuijtvlot |first = Erwin | url= http://www.few.vu.nl/en/Images/werkstuk-schuijtvlot_tcm39-225501.pdf |archive-url=https://web.archive.org/web/20190522091814/https://beta.vu.nl/nl/Images/werkstuk-schuijtvlot_tcm235-225501.pdf |archive-date=2019-05-22| title = Application of AI in poker |type=Master's thesis |publisher=Vrije Universiteit Amsterdam | year = 2011 | pages = 12–13}}
 
* {{Cite book |url=https://link.springer.com/book/10.1007/978-3-540-88190-2 |title=Advances in Artificial Intelligence - SBIA 2008 |year=2008 |pages=85–86 |language=en |doi=10.1007/978-3-540-88190-2}}
'''Effective Hand Strength (EHS)''' is a poker algorithm conceived by [[computer scientists]] [[Darse Billings]], [[Denis Papp]], [[Jonathan Schaeffer]] and [[Duane Szafron]] that has been published for the first time in a {{cite journal | last1 = research paper | url=http://www.cs.virginia.edu/~evans/poker/wp-content/uploads/2011/02/opponent_modeling_in_poker_billings.pdf | title=Opponent Modeling in Poker | journal=AAAI-98 Proceedings| year = 1998}}
 
It has since then been considered as a reference in the realm of Poker Artificial Intelligence and has been the basis of further research such as:
* {{cite journal | authorlink = Jonathan Rubin, Ian Watson | url= http://www.cs.auckland.ac.nz/~ian/papers/AIJournal.pdf | title = Computer poker: a review | journal = Artificial Intelligence, Department of Computer Science, University of Auckland, New Zealand | year = 2010 | pages = 962–963}}
* {{cite journal | authorlink = Erwin Schuijtvlot, Dr. Wojtek Kowalczyk | url= http://www.few.vu.nl/en/Images/werkstuk-schuijtvlot_tcm39-225501.pdf | title = Application of AI in poker | journal = VU University Amsterdam Faculty of Sciences | year = 2011 | pages = 12–13}}
* {{cite journal | title = Advances in artificial intelligence - SBIA 2008 : 19th Brazilian Symposium on Artificial Intelligence, Salvador, Brazil, October 26-30, 2008 ; proceedings | year = 2008 | pages = 85–86}}
 
== Algorithm ==
The algorithm is a numerical approach to quantify the strength of a Pokerpoker hand where its result expresses the strength of a particular hand in percentile (i.e. ranging from 0 to 1), compared to all other possible hands.
The underlying assumption is that an Effective Hand Strength (EHS) is composed of the current Hand Strength (HS) and its potential to improve or deteriorate (PPOT and NPOT):
 
Line 26 ⟶ 23:
Hand Strength (HS) will enumerate all possible opponent hand cards and count the occurrences where our hand is strongest (+50% of the cases where we are tied):
 
<codepre>
HandStrength(ourcards, boardcards) {
: ahead = tied = behind = 0
: ourrank = Rank(ourcards, boardcards)
 
:for each case(oppcards) {
::opprank = Rank for each case(oppcards, boardcards) {
:::oppbest opprank = Rank(oppcards,board boardcards)
::if (ourrank>opprank) ahead += 1
::else if (ourrank== > opprank) tiedahead += 1
:: else behindif (ourrank == opprank) tied += 1
::: else HP[index][behind] += 1
:}
}
:handstrength=(ahead+tied/2)/ahead+tied+behind)
 
:return(handstrength)
: handstrength = (ahead + tied / 2) / (ahead + tied + behind)
 
: return( handstrength)
}
</codepre>
 
In addition, EHS will consider the hand potential (i.e. its probabilities to improve or deteriorate):
 
<codepre>
HandPotential(ourcards, boardcards) {
// Hand potential array, each index represents ahead, tied, and behind.
: integer array HP[3][3] // initialize to 0
: integer array HPTotal[3] // initialize to 0
: ourrank = Rank(ourcards, boardcards)
 
: // Consider all two card combinations of the remaining cards for the opponent.
:for each case(oppcards){
::opprank = Rank for each case(oppcards,boardcards) {
opprank = Rank(oppcards, boardcards)
::if(ourrank>opprank) index = ahead
::else if (ourrank= > opprank) index = tiedahead
:: else if (ourrank == opprank) index = behindtied
::HPTotal[ else index] += 1behind
HPTotal[index] += 1
::// All possible board cards to come.
 
::for each case(turn,river){ //Final 5-card board
:: // All possible board cards to come.
:::board = [boardcards,turn,river]
: for each case(oppcardsturn, river) {
:::ourbest = Rank(ourcards,board)
::for each case(turn,river){ // Final 5-card board
:::oppbest = Rank(oppcards,board)
::: board = [boardcards, turn, river]
:::if(ourbest>oppbest) HP[index][ahead]+=1
::: ourbest = Rank(ourcards, board)
:::else if(ourbest=oppbest) HP[index][tied]+=1
oppbest = Rank(oppcards, board)
:::else HP[index][behind]+=1
::: if (ourbest > oppbest) HP[index][ahead] += 1
::}
::: else if (ourbest == oppbest) HP[index][tied] += 1
:}
else HP[index][behind] += 1
://Ppot: were behind but moved ahead.
}
:Ppot = (HP[behind][ahead]+HP[behind][tied]/2+HP[tied][ahead]/2)/(HPTotal[behind]+HPTotal[tied])
}
://Npot: were ahead but fell behind.
 
:Npot = (HP[ahead][behind]+HP[tied][behind]/2+HP[ahead][tied]/2)/(HPTotal[ahead]+HPTotal[tied])
: // Ppot: were behind but moved ahead.
:return(Ppot,Npot)
: Ppot = (HP[behind][ahead] + HP[behind][tied] / 2 + HP[tied][ahead] / 2) / (HPTotal[behind] + HPTotal[tied])
: // Npot: were ahead but fell behind.
: Npot = (HP[ahead][behind] + HP[tied][behind] / 2 + HP[ahead][tied] / 2) / (HPTotal[ahead] + HPTotal[tied])
 
: return( [ Ppot, Npot) ]
}
</codepre>
 
== Applicability ==
EHS is applicable to a wide variety of Pokerpoker games such as [[Texas hold 'em poker]], [[Omaha hold 'em poker]], ...
 
Given the complexity of the algorithm, it can not be computed manually and has to be used in an Artificial Intelligence context.
 
== References ==
{{Reflist}}
 
[[Category:Poker probability]]