码迷,mamicode.com
首页 > 其他好文 > 详细

用于 Quinella/Exacta/Trifecta/Pick Four/Pick Six/Quaddie/Superfecta 7大规则的测试

时间:2019-09-28 12:47:28      阅读:78      评论:0      收藏:0      [点我收藏+]

标签:sel   highlight   alc   col   and   rod   The   pytho   var   

上2篇给了详细API 设计,下面我们来模拟测试下:

Quinella:

self.bet_type = "Quinella"
self.nraces = 1
self.horse_ids.append([1,2,4,5,6,8,9])
self.user_odds.append([2.0,4.2,4.2,5.5,5.9,"-",11.0])
self.tab_odds.append([3.9,7.2,4.2,5.5,5.9,"-",11.0])

# Strategy
self.scale_tab = 0
self.scale_user = 0
self.user_div_range = (1,20)
#self.tab_div_range = (5,1000000)
self.overlay = False
self.overlay_var = 100
self.percent_by_number = 100
self.stake=0.5
self.outlay_amount=50.
self.flat_stakes=False
self.takeout = 200.
self.rounding="Nearest"
self.tabodds1 = (1,5.)
self.tabodds2 = (1,10.)

Here is the output:

2 42.5
(1, 2) 15.000
(1, 4) 27.500

Calculation Time: 0.001

Exacta:

self.bet_type = "Exacta"
self.nraces = 1
self.horse_ids.append([1,2,4,5,6,8,9])
self.user_odds.append([2.0,4.2,4.2,5.5,5.9,"-",11.0])
self.tab_odds.append([3.9,7.2,4.2,5.5,5.9,"-",11.0])

# Strategy
self.scale_tab = 0
self.scale_user = 0
self.user_div_range = (1,20)
#self.tab_div_range = (5,1000000)
self.overlay = False
self.overlay_var = 100
self.percent_by_number = 100
self.stake=0.5
self.outlay_amount=50.
self.flat_stakes=False
self.takeout = 200.
self.rounding="Nearest"
self.tabodds1 = (1,5.)
self.tabodds2 = (1,10.)

Here is the output:

4 46.0
(1, 2) 8.000
(1, 4) 14.000
(4, 1) 13.500
(1, 5) 10.500

Calculation Time: 0.001

Trifecta:

self.bet_type = "Trifecta"
self.nraces = 1
self.horse_ids.append([1,2,4,5,6,8,9])
self.user_odds.append([2.0,4.2,4.2,5.5,5.9,"-",11.0])
self.tab_odds.append([3.9,7.2,4.2,5.5,5.9,"-",11.0])
self.standouts_1 = [1,2]
self.standouts_2 = [1,2,4,5]

# Trifecta strategy
self.scale_tab = -1
self.scale_user = 0
self.user_div_range = (10,50)
self.tab_div_range = (50,1000000)
self.overlay = True
self.overlay_var = 150
#self.percent_by_number = 100
self.stake=0.5
self.outlay=1.0
self.flat_stakes=False
self.takeout = 200.
self.rounding="Nearest"
self.tabodds1 = (1,5.)
self.tabodds2 = (1,10.)
self.tabodds3 = (1,20.)

Here is the output:

3 9.5
(1, 2, 4) 4.000
(1, 2, 5) 3.000
(1, 2, 6) 2.500

Calculation Time: 0.001
self.bet_type = "Trifecta"
self.nraces = 1
self.horse_ids.append([1,2,4,5,6,8,9])
self.user_odds.append([2.0,4.2,4.2,5.5,5.9,"-",11.0])

# Trifecta strategy
self.scale_tab = -1
self.scale_user = 0
self.user_div_range = (10,50)
self.tab_div_range = (50,1000000)
self.overlay = False
self.overlay_var = 150
self.percent_by_number = 50
self.stake=0.5
self.outlay_amount=20.
self.flat_stakes=False
self.takeout = 200.
self.rounding="Nearest"
self.tabodds1 = (1,5.)
self.tabodds2 = (1,10.)
self.tabodds3 = (1,20.)

Here is the output:

3 18.0
(1, 2, 4) 6.5
(1, 4, 2) 6.5
(2, 1, 4) 5.0

Calculation Time: 0.001
self.bet_type = "Trifecta"
self.nraces = 1
self.horse_ids.append(range(1,25))
self.tab_odds.append([15.9,29.0,34.3,17.8,11.2,100.0,17.7,14.2,57.7,13.4,12.3,17.5,34.0,12.4,19.2,17.9,66.5,38.6,11.9,100.0,57.4,20.9,16.0,15.2])
self.user_odds.append([66.3,44.1,21.0,24.2,48.6,38.5,18.8,15.5,11.0,94.0,13.6,16.8,12.9,16.2,12.1,11.0,100.0,11.1,29.3,16.3,32.9,100.0,23.2,12.5])

# Strategy - Bet them all!!!

Here is the output:

12144 6072.0
(16, 9, 18) 0.500
(9, 16, 18) 0.500
(9, 18, 16) 0.500
(16, 18, 9) 0.500
.
.
.
(17, 10, 22) 0.500
(22, 10, 17) 0.500
(22, 17, 10) 0.500
(17, 22, 10) 0.500

Calculation Time: 0.5380

Pick Four:

self.bet_type = "Pick4"
self.nraces = 1
self.horse_ids.append([1,2,4,5,6,8,9])
self.user_odds.append([2.0,4.2,4.2,5.5,5.9,"-",11.0])
self.tab_odds.append([3.9,7.2,4.2,5.5,5.9,"-",11.0])
#self.standouts_1 = [1,2]
#self.standouts_2 = [1,2,4,5]

# Pick4 strategy
self.scale_tab = 0
self.scale_user = 0
self.user_div_range = (1,250)
self.tab_div_range = (250,1000000)
self.overlay = True
self.overlay_var = 200.
self.percent_by_number = 100
#self.stake=0.5
#self.outlay_amount=5.
self.flat_stakes=False
self.takeout = 500.
self.rounding="Nearest"
self.tabodds1 = (1,10.)
self.tabodds2 = (1,10.)
self.tabodds3 = (1,20.)
self.tabodds4 = (1,20.)

Here is the output:

9 13.0
(1, 2, 5, 6) 2.000
(1, 2, 6, 5) 2.000
(1, 2, 4, 9) 1.500
(2, 1, 5, 6) 1.500
(2, 1, 6, 5) 1.500
(2, 1, 4, 9) 1.500
(1, 2, 9, 4) 1.000
(1, 2, 5, 9) 1.000
(1, 2, 6, 9) 1.000

Calculation Time: 0.002

Pick Six:

self.bet_type = "Pick6"
self.nraces = 1
self.horse_ids.append([1,2,4,5,6,8,9])
self.user_odds.append([2.0,4.2,4.2,5.5,5.9,"-",11.0])
self.tab_odds.append([3.9,7.2,4.2,5.5,5.9,"-",11.0])
#self.standouts_1 = [1,2]
#self.standouts_2 = [1,2,4,5]

# Pick6 strategy
self.scale_tab = 0
self.scale_user = 0
#self.user_div_range = (1,250)
#self.tab_div_range = (250,1000000)
self.overlay = True
self.overlay_var = 100.
#self.percent_by_number = 100
#self.stake=0.5
self.outlay_amount=15.
self.flat_stakes=False
self.takeout = 1000.
#self.rounding="Nearest"
self.tabodds1 = (1,10.)
self.tabodds2 = (1,10.)
self.tabodds3 = (1,20.)
self.tabodds4 = (1,20.)
self.tabodds5 = (1,50.)
self.tabodds6 = (1,50.)
self.userodds1 = (1,10.)
self.userodds2 = (1,10.)
self.userodds3 = (1,20.)
self.userodds4 = (1,20.)
self.userodds5 = (1,50.)
self.userodds6 = (1,50.)

Here is the output:

4 15.0
(1, 4, 2, 5, 6, 9) 4.500
(1, 2, 4, 5, 6, 9) 4.000
(1, 2, 4, 6, 5, 9) 4.000
(2, 1, 5, 6, 4, 9) 2.500

Calculation Time: 0.008

Quaddie:

self.bet_type = "Quaddie"
self.nraces = 4

self.horse_ids.append(range(1,12))
self.tab_odds.append([5.2,3.2,16.2,5.8,9.3,34.8,6.7,9.7,14.3,10.5,60.])

self.horse_ids.append(range(1,8))
self.tab_odds.append([1.3,10.0,12.0,3.1,15.1,1.6,2.3])

self.horse_ids.append(range(1,10))
self.tab_odds.append([8.3,31.0,4.2,10.0,6.0,7.2,3.2,20,42.6])

self.horse_ids.append(range(1,8))
self.tab_odds.append([31.7,13.7,4.7,22.6,11.7,2.4,11.7])


#self.standouts_1 = [1,2]
#self.standouts_2 = [1,2,4,5]

# Strategy
self.scale_tab = 0
#self.scale_user = 0
#self.user_div_range = (1,250)
#self.tab_div_range = (250,1000000)
#self.overlay = True
#self.overlay_var = 200.
#self.percent_by_number = 10
#self.stake=0.5
self.outlay_amount=25.
self.flat_stakes=False
self.takeout = 500.
self.rounding="Round Up"
self.tabodds1 = (1,10.)
self.tabodds2 = (1,10.)
self.tabodds3 = (1,10.)
self.tabodds4 = (1,10.)

Here is the output:

8 25.0
(2, 1, 7, 6) 4.5
(2, 6, 7, 6) 4.0
(2, 1, 3, 6) 3.5
(2, 6, 3, 6) 3.0
(1, 1, 7, 6) 3.0
(2, 7, 7, 6) 3.0
(4, 1, 7, 6) 2.5
(1, 1, 5, 6) 1.5

Calculation Time: 0.002
self.bet_type = "Quaddie"
self.nraces = 4

self.horse_ids.append(range(1,12))
self.tab_odds.append([5.2,3.2,16.2,5.8,9.3,34.8,6.7,9.7,14.3,10.5,60.])
self.user_odds.append([4.1, 3.8, 19.1, 8.0, 7.6, 35.8, 7.2, 11.1, 11.6, 10.9, 56.8])

self.horse_ids.append(range(1,8))
self.tab_odds.append([1.3,10.0,12.0,3.1,15.1,1.6,2.3])
self.user_odds.append([1.6, 13.0, 7.2, 2.8, 20.8, 2.3, 1.9])

self.horse_ids.append(range(1,10))
self.tab_odds.append([8.3,31.0,4.2,10.0,6.0,7.2,3.2,20,42.6])
self.user_odds.append([5.0, 34.8, 5.3, 14.3, 4.3, 8.5, 3.2, 28.9, 61.3])

self.horse_ids.append(range(1,8))
self.tab_odds.append([31.7,13.7,4.7,22.6,11.7,2.4,11.7])
self.user_odds.append([29.3, 13.9, 4.7, 26.1, 15.2, 1.5, 8.9])


#self.standouts_1 = [1,2]
#self.standouts_2 = [1,2,3]
#self.standouts_1 = [1,4,5]
#self.standouts_2 = [2,3,6]

# Strategy
self.scale_tab = 0
self.scale_user = 0
#self.user_div_range = (1,500)
#self.tab_div_range = (500,1000000)
#self.overlay = True
#self.overlay_var = 200.
#self.percent_by_number = 25
#self.stake=0.5
self.outlay_amount=50.
self.flat_stakes=False
self.takeout = 1000.
#self.rounding="Round Up"
self.userodds1 = (1,10.)
self.userodds2 = (1,10.)
self.userodds3 = (1,10.)
self.userodds4 = (1,10.)

Here is the output:

10 50.0
(2, 1, 7, 6) 9.000
(1, 1, 7, 6) 5.500
(2, 7, 7, 6) 5.500
(1, 7, 7, 6) 3.500
(2, 1, 5, 6) 5.000
(2, 6, 7, 6) 7.500
(1, 1, 5, 6) 3.000
(1, 6, 7, 6) 4.500
(2, 1, 1, 6) 3.500
(2, 7, 5, 6) 3.000

Calculation Time: 0.011
self.bet_type = Quaddie
self.nraces = 4

self.horse_ids.append(range(1,25))
self.tab_odds.append([19.1,26.4,12.4,14.7,14.0,34.5,13.4,34.1,14.2,13.6,36.0,100.0,13.8,26.5,16.9,14.2,45.3,22.8,31.7,100.0,16.7,12.1,20.5,40.9])

self.horse_ids.append(range(1,25))
self.tab_odds.append([10.9,11.2,46.2,100.0,16.5,100.0,72.9,67.7,51.8,12.7,25.9,15.3,63.6,13.2,27.5,10.4,16.3,38.3,100.0,84.8,10.1,11.4,9.1,18.5])

self.horse_ids.append(range(1,25))
self.tab_odds.append([11.3,13.3,34.2,97.0,92.4,100.0,16.0,9.6,19.2,22.4,28.8,51.1,18.3,11.4,18.8,56.3,17.8,20.4,10.8,100.0,16.7,9.8,19.5,86.7])

self.horse_ids.append(range(1,25))
self.tab_odds.append([20.7,19.9,10.0,100.0,10.8,12.5,100.0,17.9,28.8,24.9,19.8,8.6,100.0,100.0,9.9,9.6,25.6,22.3,31.0,10.7,27.3,86.2,100.0,54.4])

# Strategy
self.scale_tab = 0
self.scale_user = 0
self.outlay_amount=50.
self.flat_stakes=False
self.takeout = 1000.

Here is the output:

100 50.0
(22, 23, 8, 12) 0.5
(22, 23, 22, 12) 0.5
(3, 23, 8, 12) 0.5
(3, 23, 22, 12) 0.5
(7, 23, 8, 12) 0.5
(22, 21, 8, 12) 0.5
(22, 23, 8, 16) 0.5
(10, 23, 8, 12) 0.5
(22, 23, 19, 12) 0.5
(7, 23, 22, 12) 0.5
(22, 21, 22, 12) 0.5
(3, 21, 8, 12) 0.5
(22, 23, 22, 16) 0.5
(13, 23, 8, 12) 0.5
(22, 16, 8, 12) 0.5
(3, 23, 8, 16) 0.5
(10, 23, 22, 12) 0.5
(22, 23, 8, 15) 0.5
(3, 23, 19, 12) 0.5
(5, 23, 8, 12) 0.5
(3, 21, 22, 12) 0.5
(22, 23, 8, 3) 0.5
(13, 23, 22, 12) 0.5
(22, 16, 22, 12) 0.5
(3, 23, 22, 16) 0.5
(3, 16, 8, 12) 0.5
(16, 23, 8, 12) 0.5
(9, 23, 8, 12) 0.5
(22, 23, 22, 15) 0.5
(22, 23, 1, 12) 0.5
(3, 23, 8, 15) 0.5
(5, 23, 22, 12) 0.5
(22, 23, 22, 3) 0.5
(22, 23, 14, 12) 0.5
(3, 23, 8, 3) 0.5
(3, 16, 22, 12) 0.5
(22, 1, 8, 12) 0.5
(16, 23, 22, 12) 0.5
(9, 23, 22, 12) 0.5
(3, 23, 22, 15) 0.5
(3, 23, 1, 12) 0.5
(4, 23, 8, 12) 0.5
(3, 23, 22, 3) 0.5
(3, 23, 14, 12) 0.5
(22, 1, 22, 12) 0.5
(3, 1, 8, 12) 0.5
(7, 21, 8, 12) 0.5
(22, 2, 8, 12) 0.5
(7, 23, 8, 16) 0.5
(22, 21, 8, 16) 0.5
(4, 23, 22, 12) 0.5
(22, 23, 8, 20) 0.5
(7, 23, 19, 12) 0.5
(10, 21, 8, 12) 0.5
(22, 21, 19, 12) 0.5
(22, 22, 8, 12) 0.5
(3, 1, 22, 12) 0.5
(10, 23, 8, 16) 0.5
(7, 21, 22, 12) 0.5
(22, 23, 8, 5) 0.5
(22, 23, 19, 16) 0.5
(22, 2, 22, 12) 0.5
(3, 2, 8, 12) 0.5
(7, 23, 22, 16) 0.5
(10, 23, 19, 12) 0.5
(22, 21, 22, 16) 0.5
(7, 16, 8, 12) 0.5
(13, 21, 8, 12) 0.5
(3, 21, 8, 16) 0.5
(22, 23, 22, 20) 0.5
(13, 23, 8, 16) 0.5
(10, 21, 22, 12) 0.5
(7, 23, 8, 15) 0.5
(3, 23, 8, 20) 0.5
(22, 16, 8, 16) 0.5
(22, 21, 8, 15) 0.5
(22, 22, 22, 12) 0.5
(3, 21, 19, 12) 0.5
(10, 23, 22, 16) 0.5
(22, 23, 22, 5) 0.5
(13, 23, 19, 12) 0.5
(3, 22, 8, 12) 0.5
(5, 21, 8, 12) 0.5
(10, 16, 8, 12) 0.5
(22, 16, 19, 12) 0.5
(3, 23, 8, 5) 0.5
(3, 23, 19, 16) 0.5
(3, 2, 22, 12) 0.5
(7, 23, 8, 3) 0.5
(22, 21, 8, 3) 0.5
(5, 23, 8, 16) 0.5
(7, 16, 22, 12) 0.5
(13, 21, 22, 12) 0.5
(10, 23, 8, 15) 0.5
(22, 23, 19, 15) 0.5
(3, 21, 22, 16) 0.5
(13, 23, 22, 16) 0.5
(7, 23, 22, 15) 0.5
(3, 23, 22, 20) 0.5
(5, 23, 19, 12) 0.5

Calculation Time: 7.0870

Superfecta:

self.bet_type = "Superfecta"
self.nraces = 6

self.horse_ids.append(range(1,12))
self.tab_odds.append([5.2,3.2,16.2,5.8,9.3,34.8,6.7,9.7,14.3,10.5,60.])
self.user_odds.append([4.1, 3.8, 19.1, 8.0, 7.6, 35.8, 7.2, 11.1, 11.6, 10.9, 56.8])

self.horse_ids.append(range(1,8))
self.tab_odds.append([1.3,10.0,12.0,3.1,15.1,1.6,2.3])
self.user_odds.append([1.6, 13.0, 7.2, 2.8, 20.8, 2.3, 1.9])

self.horse_ids.append(range(1,10))
self.tab_odds.append([8.3,31.0,4.2,10.0,6.0,7.2,3.2,20,42.6])
self.user_odds.append([5.0, 34.8, 5.3, 14.3, 4.3, 8.5, 3.2, 28.9, 61.3])

self.horse_ids.append(range(1,8))
self.tab_odds.append([31.7,13.7,4.7,22.6,11.7,2.4,11.7])
self.user_odds.append([29.3, 13.9, 4.7, 26.1, 15.2, 1.5, 8.9])

self.horse_ids.append(range(1,12))
self.tab_odds.append([5.,3.,16.,5.,9.,34.,6.,9.,14.,10.,30.])
self.user_odds.append([4., 4, 19., 8.0, 8, 36, 7., 11., 12, 11, 60])

self.horse_ids.append(range(1,10))
self.tab_odds.append([8.,30.0,4.,10.0,6.0,7.,3.,20,43])
self.user_odds.append([5.0, 35, 5., 14., 4., 8., 3., 29, 60])


#self.standouts_1 = [1,2]
#self.standouts_2 = [1,2,3]
#self.standouts_1 = [1,4,5]
#self.standouts_2 = [2,3,6]

# Strategy
self.scale_tab = 0
self.scale_user = 0
#self.user_div_range = (1,500)
#self.tab_div_range = (500,1000000)
#self.overlay = True
#self.overlay_var = 200.
#self.percent_by_number = 25
#self.stake=0.5
self.outlay_amount=100.
self.flat_stakes=False
self.takeout = 10000.
self.rounding="Round Up"
self.userodds1 = (1,10.)
self.userodds1 = (1,10.)
self.userodds3 = (1,10.)
self.userodds4 = (1,10.)
self.userodds4 = (1,10.)
self.userodds4 = (1,10.)

Here is the output:

43 100.0
(2, 1, 7, 6, 2, 7) 6.000
(2, 1, 7, 6, 1, 7) 3.500
(1, 1, 7, 6, 2, 7) 3.500
(1, 1, 7, 6, 1, 7) 2.500
(2, 7, 7, 6, 2, 7) 3.500
(2, 7, 7, 6, 1, 7) 2.000
(1, 7, 7, 6, 2, 7) 2.000
(1, 7, 7, 6, 1, 7) 1.500
(2, 1, 7, 6, 2, 5) 3.000
(2, 1, 7, 6, 1, 5) 2.000
(2, 1, 5, 6, 1, 7) 2.000
(2, 1, 5, 6, 2, 7) 3.500
(2, 6, 7, 6, 1, 7) 3.000
(2, 6, 7, 6, 2, 7) 5.000
(1, 1, 7, 6, 1, 5) 1.500
(1, 1, 7, 6, 2, 5) 2.000
(1, 1, 5, 6, 1, 7) 1.500
(1, 1, 5, 6, 2, 7) 2.000
(1, 6, 7, 6, 1, 7) 2.000
(1, 6, 7, 6, 2, 7) 3.000
(2, 1, 1, 6, 1, 7) 1.500
(2, 1, 1, 6, 2, 7) 2.500
(2, 7, 7, 6, 2, 5) 2.000
(2, 7, 7, 6, 1, 5) 1.000
(2, 7, 5, 6, 1, 7) 1.500
(2, 7, 5, 6, 2, 7) 2.000
(2, 1, 3, 6, 2, 7) 4.500
(2, 1, 3, 6, 1, 7) 3.000
(2, 1, 7, 6, 1, 3) 3.000
(2, 1, 7, 6, 2, 3) 4.500
(2, 1, 7, 6, 1, 1) 1.500
(2, 1, 7, 6, 2, 1) 2.500
(1, 1, 1, 6, 2, 7) 1.500
(1, 1, 1, 6, 1, 7) 1.000
(1, 7, 7, 6, 1, 5) 1.000
(1, 7, 7, 6, 2, 5) 1.000
(1, 7, 5, 6, 2, 7) 1.500
(1, 7, 5, 6, 1, 7) 1.000
(2, 4, 7, 6, 1, 7) 1.500
(2, 4, 7, 6, 2, 7) 2.500
(2, 1, 7, 6, 7, 7) 3.000
(2, 1, 5, 6, 1, 5) 1.000
(1, 7, 1, 6, 1, 7) 0.500

Calculation Time: 1.546


到此,测试完成,呵呵,有对体育/赛马/赛事/彩票投注感兴趣的小伙伴,可以参考下!!

用于 Quinella/Exacta/Trifecta/Pick Four/Pick Six/Quaddie/Superfecta 7大规则的测试

标签:sel   highlight   alc   col   and   rod   The   pytho   var   

原文地址:https://www.cnblogs.com/mschen/p/11602466.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!