Chicago LabVIEW User Group

cancel
Showing results for 
Search instead for 
Did you mean: 

Powerball Simulator Challange

I figured it was time to create my own Powerball simulator with the jackpot hitting a record amount..The number of tickets to purchase is user configurable.My current code generates and checks 10,000 combinations every 2.125 milliseconds and hits a jackpot in 15 to 120 seconds.  I have not fully optimized my code but off to a good start.

I realize that this is CPU dependent so I will publish a link to download the EXE.  I intend to publish my code soon but want to give others in the community the opportunity to create their version.

simResults.png


Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 1 of 4
(6,288 Views)

Link to the Powerball simulator executable.  You will need to change the .e extension to .exe.  I will post my LabVIEW code early next week.

The challenge is creating efficient code.

https://drive.google.com/file/d/0B2ahen3USkgZOE9QdHZxWWZ4azQ/view?usp=sharing

Matt

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 2 of 4
(5,607 Views)

I developed the Powerball simulator because a coworker wanted a coding challenge for their high school class. Strange thing, my executable runs SLOWER than just running my code from LabVIEW.  How is this possible?  I am looking forward to see other solutions.  I will post my source code on Monday,

Matt

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 3 of 4
(5,607 Views)

Source code can be downloaded form this link: https://drive.google.com/file/d/0B2ahen3USkgZU2hLMk5zUzVsRTQ/view?usp=sharing

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 4 of 4
(5,607 Views)