473,414 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Is Python for me?

Hi,

I'm planning to create a poker calculator, I learned some basic in
highschool years ago and I was told for beginners Python is a good
language to start.

What I wanted to do is to first write a program which will be able to run
through all the possible combinations of cards dealt out and use some
counters to calculate different probabilities at different stages. Since
that is a lot of data I think I have to store it in some kind of database
or spreadsheet type thing?

Then I wanted to write a simple user interface so I could use my mouse to
make selections of cards that I am dealt and that come on the flop and how
many opponents and have the program find the calculated information and
display it on the screen.

I am wondering if I learn to use Python will I be able to write something
like this? My friend studied some C in college so I thought I'd learn C++,
turns out it is a very complicated language so I thought maybe I should try
something else before I commit more time to the language.

Thank you very much in advance

Feb 9 '07 #1
8 1250
jiddu wrote:
Hi,

I'm planning to create a poker calculator, I learned some basic in
highschool years ago and I was told for beginners Python is a good
language to start.

What I wanted to do is to first write a program which will be able to run
through all the possible combinations of cards dealt out and use some
counters to calculate different probabilities at different stages. Since
that is a lot of data I think I have to store it in some kind of database
or spreadsheet type thing?

Then I wanted to write a simple user interface so I could use my mouse to
make selections of cards that I am dealt and that come on the flop and how
many opponents and have the program find the calculated information and
display it on the screen.

I am wondering if I learn to use Python will I be able to write something
like this? My friend studied some C in college so I thought I'd learn C++,
turns out it is a very complicated language so I thought maybe I should try
something else before I commit more time to the language.

Thank you very much in advance
Yes, use python, you will get the most return on your learning effort,
though some learning is required. Start at python.org -docs -tutorial.

James
Feb 9 '07 #2
i hope you know that for this task, if you want it to be successfull,
you need a really big database. it sounds very simple to this. it
sounds like go through all possible permutations. before you start
writing any code take a pencil and a big paper and do some maths. i
sugesst you read and practise this for about a year about data
structures, algorithms and graph theory (just for the begining). Then
take a look on data mining and then incpect the era model so you can
design a good database.
Tic Tac Toe is a much easier problem and there are a lot of possible
different games (9*8*7*6*5*4*3*2*1=362 880 i dont consider the
rotations).

it's true that you learn best by solving a problem, but if stoped on
basic on higjschool, then you will need a lot of time to solve this
problem. If you remember basic than you should learn python according
to basic's possibillities in maximum a month. depending on talent and
spare time.

i sugesst you take some a "a little bit" easier problem to learn
python.

For this speciffic problem it shold be good to learn on other games. I
started about 7 years ago on tic tac toe and then with reversi.

You are from USA? I come from a differtent continent so i don't know
what you learn in schools. But if you didn't learn it, take a look on
statistics. very usefull. you should at least know what specific terms
mean althought python has them in the numpy module.

don't be afraid of all that i said. keep learning and it will pay off.
at the end when you crack the poker machine :-)
that's the life of a geek. learn , learn, learn and one day comes the
jackpot.


--------------------------------------------------------------
and no, I am not a junkee, I'm addicted to Python

Feb 9 '07 #3
i forgot a query language. something like postgre or mysql
On Feb 9, 7:37 am, "azrael" <jura.gro...@gmail.comwrote:
i hope you know that for this task, if you want it to be successfull,
you need a really big database. it sounds very simple to this. it
sounds like go through all possible permutations. before you start
writing any code take a pencil and a big paper and do some maths. i
sugesst you read and practise this for about a year about data
structures, algorithms and graph theory (just for the begining). Then
take a look on data mining and then incpect the era model so you can
design a good database.
Tic Tac Toe is a much easier problem and there are a lot of possible
different games (9*8*7*6*5*4*3*2*1=362 880 i dont consider the
rotations).

it's true that you learn best by solving a problem, but if stoped on
basic on higjschool, then you will need a lot of time to solve this
problem. If you remember basic than you should learn python according
to basic's possibillities in maximum a month. depending on talent and
spare time.

i sugesst you take some a "a little bit" easier problem to learn
python.

For this speciffic problem it shold be good to learn on other games. I
started about 7 years ago on tic tac toe and then with reversi.

You are from USA? I come from a differtent continent so i don't know
what you learn in schools. But if you didn't learn it, take a look on
statistics. very usefull. you should at least know what specific terms
mean althought python has them in the numpy module.

don't be afraid of all that i said. keep learning and it will pay off.
at the end when you crack the poker machine :-)
that's the life of a geek. learn , learn, learn and one day comes the
jackpot.

--------------------------------------------------------------
and no, I am not a junkee, I'm addicted to Python

Feb 9 '07 #4
In <e0******************************@localhost.talkab outprogramming.com>,
jiddu wrote:
I'm planning to create a poker calculator, I learned some basic in
highschool years ago and I was told for beginners Python is a good
language to start.
There's a recipe in the Cookbook that might be interesting for you:

http://aspn.activestate.com/ASPN/Coo.../Recipe/415504

And a library called `poker-eval` with Python bindings:

http://pokersource.org/

Ciao,
Marc 'BlackJack' Rintsch
Feb 9 '07 #5
On Feb 9, 5:08 am, "jiddu" <sseebbaa...@yahoo.comwrote:
I'm planning to create a poker calculator, I learned some basic in
highschool years ago and I was told for beginners Python is a good
language to start.
Be sure to check out the Python411 podcast
http://awaretek.com/python/index.html

Take care,
Davy

http://www.latedecember.co.uk/sites/personal/davy/?clp

Feb 9 '07 #6
On 2007-02-09, jiddu <ss*********@yahoo.comwrote:
Hi,

I'm planning to create a poker calculator, I learned some basic
in highschool years ago and I was told for beginners Python is
a good language to start.
Python *is* a good language to start.
What I wanted to do is to first write a program which will be
able to run through all the possible combinations of cards
dealt out and use some counters to calculate different
probabilities at different stages. Since that is a lot of data
I think I have to store it in some kind of database or
spreadsheet type thing?
Unfortunately, that is a very *difficult* problem; no programming
library (save a hypothetical poker probability library) can make
it easy.
Then I wanted to write a simple user interface so I could use
my mouse to make selections of cards that I am dealt and that
come on the flop and how many opponents and have the program
find the calculated information and display it on the screen.

I am wondering if I learn to use Python will I be able to write
something like this? My friend studied some C in college so I
thought I'd learn C++, turns out it is a very complicated
language so I thought maybe I should try something else before
I commit more time to the language.
Python can help you with creating an user interface, and with
several simple, powerful data structures. I think you ought to
lower your ambition a bit, at first. Firts write a program to
rank complete sets of poker hands. That should hold you for a
while.

--
Neil Cerutti
The recording I listened to had Alfred Brendel doing the dirty work of
performing this sonata (Liszt B minor) --Music Lit Essay
Feb 9 '07 #7
Thanks for all the input guys, I know it is difficult, but the calculators
and statistic sites/books are missing some things which I need for my play
so I guess I have no choice but to study up and work.

When I was learning C++ I wrote some code to calculate simple things like
probability of 1 or more player to have pocket pair in 9 handed game, its
not finished but I realised I need to use some kind of database and
someone suggested to me try python because it will be easier to learn.

Again thanks for the help guys

Feb 9 '07 #8
On 2007-02-09, jiddu <ss*********@yahoo.comwrote:
Thanks for all the input guys, I know it is difficult, but the
calculators and statistic sites/books are missing some things
which I need for my play so I guess I have no choice but to
study up and work.
You're most welcome.

Though I really have no idea whom you're thanking or for what
you're thanking them [a situation remedied by posting your
thank-you as a follow-up to the relevent thread], it would be
rude for nobody to acknowledge your thanks. ;)

--
Grant Edwards grante Yow! ... this must be what
at it's like to be a COLLEGE
visi.com GRADUATE!!
Feb 9 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.