Craps Python Program

3/31/2022by admin

This is a collection of auto-bet and roll files for use with WinCraps. They're not systems, strategies, schemes, or methods either sold or promoted by Cloud City Software, but rather are examples to help you better understand and use WinCraps' auto-betting and dice rolling capabilities. Some of them address specific user questions, some demonstrate coding techniques, and some are examples of routines discussed in public forums.

Do you have any auto-bet or roll files you've created that you'd like to share? Whether they're complete betting strategies or just part of something interesting or fun, feel free to send them in.

I am currently creating a craps game simulator, but it appears that my code wont really run. My code is attached and for a few notes, every time there is a roll of the dice, the user must hit enter which will cause the program to roll the dice. For a brief overview, here is some of the rules behind craps. Part One - Part Two - Part Three - Part Four - https://youtu.be/AhXY0e.

To download a file, click on the underlined filename and a file save dialog box should appear. Note that some browsers may try to open the file in the browser window instead of downloading. If this happens, then right-click the underlined filename and select 'Save target as' or 'Save link as'. A file save dialog box should appear. If your browser shows '.html' as the file extension then change it to '.bet'.

If you'd like to just look at one of the 'pro' files without downloading it, right-click the filename and select 'Open link in new tab/window'. Unfortunately, this won't work with the older 'classic' files because they're not pure text files.

Craps Python Program

To play the file, open WinCraps and do the following:

Blackjack python program

For auto-bet files:

  • Click on the Action menu and select Auto-bets
  • On the Auto-bet screen, click on the File menu and select Open
  • Locate the file you want and click on OK
  • Check the Activate check-box and then return to the main game table

For dice roll files:

  • Click on the Action menu and select Dice Roll Files
  • On the Dice Roll Files screen, click on the File menu and select New/Open
  • Locate the file you want and click on OK
  • Choose the Playback option and then return to the main game table

Python

Auto-Bet Files

The scripts below are written for WinCraps Pro and will not run under WinCraps Classic

Risk of ruin
This script plays Passline (and odds if selected) until insufficient bankroll remains to make a wager, a specified amount of action has transpired, a specified win goal has been reached, or a specified number of rolls have been reached (time). Plays multiple sessions. Use the histograms on the Sessions Log to discover the risk of ruin.

Stacy's low ev hedge system
Bets are made proportionally on Pass Line, Pass Line Odds, and Don't Pass such that the system wins whenever points are resolved (whether the shooter makes the points or not) and can only lose on come-out rolls of 7, 11, or 12. As proposed by Stacy Friedman.

BDalt
This system plays Passline and Come bets with 10x odds. Includes a progression from one to two Come bets, a regression to 5x odds, win goals, and loss limits. Plays multiple sessions. As proposed by Bill Dalton.

5 count
This system plays Passline and/or Come bets with odds after the shooter has made 5 qualifying rolls.

5 no field
This script bets the Field after 5 consecutive non-Field rolls. A loss triggers a 3-step loss progression with subsequent bets made after another 5 consecutive non-Field rolls. A win resets the system.

3 tier progression
This script bets the Don't Pass utilizing a 3-tiered loss progression. Each tier has 3 bets which if lost cause all betting to cease until the shooter seven's out. Then betting continues on the next tier.

Lay fire
This script plays the Fire bet and adds Lay bet hedges after 4 and/or 5 separate points have been made.

Labouchere
This script plays the Labouchere system on the Field. The script will query you for a list of numbers. Bet amounts are then determined by adding the first and last numbers in the list. If the bet wins, then the first and last numbers are crossed off the list. If the bet loses, then the amount lost is added to the end of the list.

Place prog
This script plays a loss progression on selected Place bets. It asks which Place bets you want to play and for the progression amounts. It also asks for loss limits, win goals, roll limits and plays multiple sessions.

Midnight madness
This script plays a progression on the Twelve based on the number of rolls since a 12 has appeared. It asks for roll and bet amounts for each desired step as well as loss limits, win goals, roll limits, and number of sessions.

Qualprog
This script plays a progression and/or regression on Passline and/or Don't Pass bets. It provides delayed betting until the table has qualified by rolling selected patterns of winning bets. It queries for bet amounts, patterns, winning/losing decisions, loss limits, win goals, and number of sessions. It's a very flexible and useful script.

Roll tracker example
This script shows a way to keep a running record of recent rolls and track the frequency of numbers within defined roll intervals.

Roll tracker simple example
This is a simplified version of the roll tracker script above.

Regress n press inside-out
This script plays Place and Buy bets starting with an array of large bets, regressing all bets on the first win, and then pressing from the inside out on every other win.

Points in a row
This script records the number of points made in a row and saves the resulting streaks on checkstacks.

7's in 6
This script records the number of 7's rolled within 6-roll intervals. If the probability of a 7 is 1/6, what's the probability of rolling one 7 in 6 rolls? Find out here.

Fibonacci
This script plays a Fibonacci progression (1,1,2,3,5,8 ... where each step is the sum of the previous 2 steps). The script queries for type of progression desired (win or loss), which bets to play (Passline or Don't Pass), win goals, loss limits, and multiple sessions.

Odds parlay 1000
This script plays a flat $10 Passline bet and parlays the odds from $25 to $1000. A win at the $1000 level or any loss starts the parlay over. Requires a 100x odds table. Plays multiple sessions.

Play multiple roll files sequentially
This script is an example of how to play multiple roll files sequentially and automatically. Roll file names are listed on checkstacks in the order you want them played.

Play multiple roll files according to points
This script is an example of how to draw rolls from different roll files according to whether the shooter is on a come-out roll or upon which point has been established.

1326 progession
This script plays a 4-step progression on the passline (intended for any even-money bet) risking only two betting units for a chance to win ten units.

Duct tape
This script plays continuous do-don't bets. Proposed by Urawan.

Roll frequencies
This script records frequencies of selected rolls on checkstacks similar to the Roll Frequencies screen.

ATS Hedge
This script plays AllSmall, AllTall, and MakeAll bets with Lay and Hop hedges. Proposed by Vince Armenti.

Ultimate66
This script plays inside Place bets with a couple of presses. Proposed by Vince Armenti.

Grinder's Press
This script plays inside Place bets, outside Buy bets, and continuous Don't Come bets. Proposed by Vince Armenti.

Boender Strategy
This script begins with a Passline bet then adds 2 inside Place bets and a Field bet when a point is established. The Place and Field bets are then used to fill the remaining open Place bets. Once all Place bets are covered (no more Field) inside Place bets alternate independently between collecting and pressing. Place 4 & 10 are always pressed and eventually converted to Buy bets. The Passline follows an independent win progression and adds Craps bets upon reaching $25 or greater.

Dicer's two hit'n down progression
This script plays inside Place bets for two hits in each of 5 progressive levels. Plays multiple sessions and outputs data to a text file.

Professor H's Don't Pass Strategy
This script plays Don't Pass bets while progressively laying odds. Plays multiple sessions and outputs data to a text file.

Dave's System
This script plays Don't Pass and Don't Come bets while only laying odds on points 5,6,8,and 9. Odds are removed and new bets stopped if two established flat bets are lost on a shooter. Plays multiple sessions.

Boozer's Delight
This script plays Passline and Don't Pass simultaneously. Once points are established, odds are taken on the Passline resulting in a can't lose situation (losses can only be incurred on come-out rolls.) As described on Craps Pit (http://www.starchip.com/crapsub.htm).

d'Alembert
This script plays the Passline, increasing bets on losses and decreasing bets on wins. Plays multiple sessions.

The scripts below are written for WinCraps Classic but will also run on WinCraps Pro

7s in a row
This script records the number of 7's in a row and saves the resulting streaks on chip-stacks. It's a good example to use if you want to record streaks of something. For instance, the script below has been modified to record passes in a row.

Passes in a row
This script records the number of passes in a row and saves the resulting streaks on chip-stacks.

Heavy_craps_lesson
This script plays a win progression on all Place bets. Script by Jake Schneider.

Place bet point xfer
This script plays all Place bets except for the point number (e.g. if the point is 8 then the Place 8 will be zero). When points are established on numbers that already have Place bets, the amounts will be transferred to open Place bets.

1980 passline trials
This script plays games comprised of 1980 Passline trials and records the outcomes on chip-stacks. 1980 is the lowest common denominator for computing all probable outcomes in a Passline wager. After multiple games are run, the mean values for the chip-stacks found on the Games Log can be compared with the predicted probable values.

Set action on passline
This script plays the Passline and Passline Odds (if selected) for a specified amount of action. It queries you for bet size, amount of action, number of games, and whether you want odds. Simulations without odds can be compared to simulations with odds to discover the real effect that odds bets have on expected value and variance when similar amounts of action are played.

Throws to make point
This script tracks the number of throws it takes to resolve a point after it has been established. When multiple games are played the resulting distribution can be seen on the Games Log histogram.

Shoot1
This script records passes and misses to a text file which can be read with any word processor or spreadsheet program. Results are grouped according to shooters. Consecutive passes or consecutive misses are recorded on the same line thus creating a graph effect.

Shoot2
This script records passes and misses to a text file which can be read with any word processor or spreadsheet program. Results are grouped according to shooters. All passes or misses for each shooter are recorded on the same line.

10x5 mini-mart
This script alternates betting between the Passline and Don't Pass in 10 levels. Each level makes a unique pattern of bets (such as PDPPD) and wagers according to a mini-Martingale. Contains an interesting technique for detecting patterns.

Prob6843
This script records and displays the probability of rolling a 6 or an 8 before a 4 within 3 rolls.

White
This script makes continuous Passline and Come bets. Wagers are sized according to a predetermined formula. Proposed by Mike White.

YASS
'Yet Another Spread System' begins as an 'Anything but 7' system but then uses Come bets to replace Place bets. Proposed by Stacy Friedman.

4 barrel
This script makes Passline and Come bets without taking odds until four flat bets have been established. Then odds are taken on all bets simultaneously. Proposed by Stacy Friedman.

MAT
MAT = Moving Average Tracker. This script keeps track of the five most recent line decisions and makes Passline or Don't Pass bets according to which decisions have been occurring more often. Proposed by Mason Clarke.

Tale of four brothers
This script compares four Passline strategies. See if you can predict which strategy will fare the best. Proposed by Mason Clarke.

SRR
This script tracks come-out rolls, point-cycle rolls, and 7's, while setting up ratios to show their relationships. Proposed by Ray Pratt.

Fire
This script simulates a bet which wins if a shooter establishes and wins four, five, or six different points during his hand.

Krigcome
This script plays progressive Passline and Come bets without odds. Proposed by Al Krigman.

8samp678
This script records the number and percentage of 8-roll samples that contain no 6,7,or 8's. Written in response to issues raised by 'redleathers' on the usenet group rec.gambling.craps.

8strk678
This script records the number of times that 8 or more rolls have gone by without a 6,7,or 8 appearing. Written in response to issues raised by 'redleathers' on the usenet group rec.gambling.craps.

Fieldker
This script plays John Kerr's two-win martingale Field bet loss progression.

Sevens
This script records stats for the number and percentage of come-out sevens and seven-outs.

1 parlay
This script bets the Passline. Single wins are parlayed and losses trigger a loss progression

3 decision parlay
This script bets the Don't Pass. Betting is delayed until 3 winning Passline decisions have occurred. Wins are parlayed once after another 3 winning Passline decisions.

3 sevens dp
This script waits until 3 sevens have appeared then bets continuously on the Don't Pass until a loss after which the cycle repeats.

68 press 1
This script is a win progression on the Place 6 and 8 bets. Each winning bet is pressed by 1 unit. Any loss resets the cycle.

68 regression 1
This script bets the Place 6 and 8 starting at $24 each and regressing $6 for each non-come-out roll. A 7-out resets the cycle.

68 progression 1
This system is a double-up loss progression on the Place 6 and 8 bets (a quasi-Martingale).

68 progression 4
This is a progressive/regressive system for the Place 6 and 8 including a delay after 3 successive losses.

68 progression 5
This is a 5 level loss progression on Place 6 and 8.

Inside regression 1
This script bets the inside Place bets (5,6,8,9). After a point is established, $66 inside is bet. After the 1st win, bets are regressed to $22 inside. After the 2nd win, bets come down.

Delay1
This script is a short example of delayed betting. It waits until 3 rolls after a point is established to make a Don't Come bet.

Diffodds
This script is a short example of taking varying amounts of Come odds on different numbers.

Doey don't
This script bets the Pass Line and Don't Pass as well as Come and Don't Come in a simple 3-point system. Odds are then either taken or laid depending on how you set up the table.

Loss limit - win goal
This script asks you for your win goal and loss limit, then notifies you when either has been reached and allows you to reset them. It also makes ATM transactions.

No 410 progression
This script bets Lay 4 if 10 is the point, and Lay 10 if 4 is the point, while doubling bets up to 3 times after losses.

31 system progression
This script plays a 31 progression (1,1,1,2,2,4,4,8,8) on the Pass Line. Single wins are pressed once. Pressed wins start the system over and any losses progress the bet one step higher.

Fibonacci progression
This script plays a Fibonacci progression (1,1,2,3,5,8 ... where each number is the sum of the previous 2 numbers) on the Pass Line. Single wins are re-bet, double wins start the progression over, and losses advance the progression.

4x4 Don't Pass progression
This script plays a 4 level Don't Pass loss progression with 4 bets at each level. If all 4 bets are lost on one level, betting stops until a 7-out, then resumes on next level up.

Parlay to max
This script alternates between the Pass Line and the Don't Pass with winning bets parlayed to set maximums.

Turnaround
This script plays Ian Harmer's TURNAROUND system using the Pass Line bet (can be changed to work with any bet).

Ice cold
This script plays a very patient doey/don't style system that waits for 4 shooters to 7-out in a row before betting.

Simple prog
This script plays a very simple 'last bet plus one unit' loss progression on the Pass Line.

2x passline field
This script plays both the Pass Line and the Field (on the come-out only) and doubles up when both bets lose.

Time before last
This script bets either the Pass Line or Don't Pass based on which won the time before last. Includes a modest win progression.

Stats723
This script is an example of collecting statistics. It records the number and percentage of 7's that are thrown immediately after 2's and 3's.

Labouchere
This script bets the Labouchere (or cross-out) system where each bet is determined by adding the first and last numbers from an arbitrary list of numbers. If a bet wins, the first and last numbers are crossed off the list. If a bet loses, the amount bet is added to the end of the list.

Odds progression
This is an odds progression system on the Pass Line and Don't Pass. It tracks and rates pass and miss trends using a running count and bets accordingly. Proposed by C. Michael Brannan.

Hoyle's press
This script is a variation of Hoyle's Press on the Don't Pass. It's a win progression that adds 1 unit to each winning bet and keeps losing bets the same as before.

Big little inside place
This script plays a press and regress on the inside Place bets.

Horn progression
This script plays a progression on the Horn with a 10 non-horn roll delay.

1up2win
This script plays the Pass Line pressing each bet by 1 unit as long as a cumulative loss exits.

50winprg
This script plays a 50% win progression on the Pass Line with a delay for qualifying shooters.

Gyshoeb9
This script plays the 'shoeblack method' - a progression/regression on the inside Place bets. Proposed by Lou Williams.

Oscar's grind - Passline
This script plays Oscar's Grind on the Pass Line. Each winning bet is pressed 1 unit as long as a loss exists for the series.

Oscar's grind - Place
This script is a takeoff of Oscar's Grind on the inside Place bets.

Double time
This script plays a slow-motion Martingale on the Pass Line as proposed by Jim Ferr.

1dp2dc
This script plays a 3 bet win progression on Don't Pass and Don't Come.

Full court press
This script bets Pass Line, Place 6/8, and continuous Come bets.

Field cor
This script plays a delayed Martingale on the Field by betting only on come-out rolls.

Boxcars 2
This script plays a 6-level loss progression on Twelve.

Catch 33
This script plays a delayed flat-bet trend system on Pass Line and Don't Pass.

Hit Place
This script attempts to capitalize on repeat Place #'s.

Hardway parlay
This script makes $1 Hardway bets and parlays them a selected number of times.

Don't Pass progression 1
This script plays a progression/regression on Don't Pass according to the number of units behind.

Don't Pass progression 2
This script plays a Martingale loss progression on Don't Pass with a delay for starting and stopping bets.

Don't Pass / Place progression 1
This script plays a Don't Pass / Place bet hedge progression. Builds Don't Pass Odds and presses Place bets according to wins.

Two 4's now 7
This script bets Lay 4 after two 4's have shown (without a 7) in hopes that a 7 will show. Utilizes a 20% win progression.

Free
This script plays a Martingale-like progression on Don't Pass by David Jones.

Free2
This script plays a Martingale-like progression on the Pass Line by David Jones.

Bankroll change
This script provides a quick means of changing your bankroll. Intended to be used as a Hot-key (see WinCraps help file for Hot-keys)

Passline Come 3
This script plays the Pass Line and 2 to 3 Come bets. Bets are progessed 1 unit for every 2 wins with counts taken separately. Come 6 and 8 odds (if taken) work on the come-out roll.

Anything but 7
This very short simple file plays a Field and Place bet combination that wins on every roll except for a 7.

Bigparl
This script switches back and forth between the Pass Line and Don't Pass depending on which one won the time before last. Winning bets are increased according to a 4-step progression. Proposed by Jim Ferr.

Ricochet
This script waits for a point to be established then lays the point, bets the Eleven, and bets the Don't Come. The Lay and Eleven act as a hedge for the Don't Come while it becomes established on a point. Once established, the Lay bet is taken down.

Passmg50
This script plays a Martingale progression on the Pass Line using a $50 win goal with automatic deposits to the ATM.

Two 7s in three rolls
This script plays Place 6 and 8 whenever two 7's have appeared within 3 rolls.

No 12
This system plays the Twelve in 3 tiers whenever 12's have failed to appear for a certain number of rolls.

68 lock and load
This script plays a regression/progression on Place bets starting with 6 and 8 then spreading to all the numbers.

Setpump2
This script plays Don't Pass and up to 5 Don't Come bets using progressive amounts as bets become established on points.

Midas
This script plays a cross-out system (similar to the Labouchere) on the Pass Line. It starts with a list of 4 numbers determined from a stated win goal which are then used to make bets. When any bet wins, the numbers used to make it are crossed off the list and the next bet is determined by adding the first and last numbers in the list. When beginning or after any loss, bets are made using only the first (uncrossed) number in the list.

68 trend
This script does not make any bets. Instead it tracks the number of 6's and/or 8's that a shooter rolls after a point has been established. The intent is to run Hyper-drive or Auto-rolling until two consecutive shooters have rolled at least two 6's and/or 8's then Hyper-drive/Auto-rolling is terminated and you take over manually. Proposed by Robert De Garmo.

9s between 7s
This script counts the number of 9's that are rolled between 7's including the average and the maximum number encountered.

Balls and bucks
Bets are made on Passline w/ odds, Place, and C&E. As proposed on Crapspit.

The scripts below are written for WinCraps Classic. They can also be opened with WinCraps Pro but will not run properly without some modification (most have an equivalent file written specifically for WinCraps Pro).

Risk of ruin classic
This script plays Passline (and odds if selected) until insufficient bankroll remains to make a wager, a specified amount of action has transpired, a specified win goal has been reached, or a specified number of rolls have been reached (time). Plays multiple games using the hyper-drive. Use the Games Log histograms to discover the risk of ruin.

3 tier progression classic
This script bets the Don't Pass utilizing a 3-tiered loss progression. Each tier has 3 bets which if lost cause all betting to cease until the shooter seven's out. Then betting continues on the next tier.

5 count classic
This script delays betting until the shooter has rolled 5 qualifying rolls, then a bet is made on either the Pass Line or Come.

Stacyhdg classic
This script plays Stacy's Low-EV Hedge system. Bets are made on Pass Line, Pass Line Odds, and Don't Pass. As proposed by Stacy Friedman.

5 no field classic
This script bets the Field after every 5 consecutive non-Field rolls have occurred. A loss triggers a 3-step loss progression and a win resets it.

1 parlay classic
This script bets the Passline. Single wins are parlayed and losses trigger a loss progression.

3 sevens dp classic
This script waits until 3 sevens have appeared then bets continuously on the Don't Pass until a loss after which the cycle repeats.

31 system progression classic
This script plays a 31 progression (1,1,1,2,2,4,4,8,8) on the Pass Line. Single wins are pressed once and any loss progresses the series. Shows an example of using a Flag.

The dance
This script is a hybrid of the Martingale and Labouchere systems. Play switches back and forth between the Pass Line and Don't Pass. Proposed by 'call_me_dan'.


Dice Roll Files:

Hotbits1
This is a dice roll file containing 10,000 rolls created from timing the random decay of Krypton-85 into Rubidium-85.

Hotbits2
This is a dice roll file containing 10,000 rolls created from timing the random decay of Krypton-85 into Rubidium-85.

Hotbits3
This is a dice roll file containing 10,000 rolls created from timing the random decay of Krypton-85 into Rubidium-85.

Randorg50k
This is a dice roll file containing 50,000 rolls created from random atmospheric radio noise.

Randorg100k
This is a dice roll file containing 100,000 rolls created from random atmospheric radio noise.

Randorg200k
This is a dice roll file containing 200,000 rolls created from random atmospheric radio noise.

Xorshift 500k
This is a dice roll file containing 500,000 rolls created from XORShift128+ random number generator.

Xorshift 1m
This is a dice roll file containing 1,000,000 rolls created from XORShift128+ random number generator.

Stanroll
This dice roll file was created by randomly shuffling a collection of 36,000 perfectly distributed rolls.

Precision
This is a dice roll file containing 737 rolls that were recorded by a self-described 'precision shooter' over the course of many sessions (name withheld by request).

Noah
This is a dice roll file containing 1564 rolls that were recorded by Noah Hazel. Noah attempts to set the dice and throw 'precision rolls'.


Note: Please see the F.A.Q. for instructions on how to create your own roll file from random data found at various online resources.

Beginner coder and having some trouble with a while loop for this assignment making a simple craps game. This is what I have so far...

  • 5 Contributors
  • forum5 Replies
  • 2,580 Views
  • 1 Day Discussion Span
  • commentLatest PostLatest Postby snippsat

Recommended Answers

Coding

Blackjack Python Program

I think you should also call your main function ;) Luckyly the sum can not be the 6-tuple of numbers as the sum or point variables do not change inside the while at line 14. sum is also bad name for variable as it is used for function to do …

Jump to Post

What is the while loop supposed to do?? Right now it just prints. Note that

Python Craps Coding

Blackjack python program

will never be True because you are comparing an integer and a tuple.

Jump to Post

All 5 Replies

I think you should also call your main function ;) Luckyly the sum can not be the 6-tuple of numbers as the sum or point variables do not change inside the while at line 14. sum is also bad name for variable as it is used for function to do sum of sequence. Line 21 does nothing

Editedby TrustyTony
Casino Barriere Coffret Cadeau
Comments are closed.