Search found 11 matches

by grom
Tue Aug 23, 2011 12:43 am UTC
Forum: Coding
Topic: Texas Holdem
Replies: 6
Views: 1601

Re: Texas Holdem

It is comparing against all possible flops. Doesn't factor in number of opponents at all.

So statically it is saying 33 is better hand then AKs (not considering turn and river here). But I realize strategically it has weakness cause there so many overpairs that could be beating you.
by grom
Tue Aug 02, 2011 6:11 am UTC
Forum: Coding
Topic: Texas Holdem
Replies: 6
Views: 1601

Re: Texas Holdem

Here is a snippet of the results I got: 32 0.396442 42 0.400637 32s 0.403267 52 0.404965 42s 0.40746 43 0.40807 62 0.409508 72 0.411189 52s 0.411784 53 0.412399 AJ 0.608617 AJs 0.613498 AQ 0.62399 AQs 0.628703 22 0.640717 AK 0.647384 AKs 0.65181 33 0.664334 44 0.687951 55 0.711584 66 0.735251 77 0.7...
by grom
Tue Aug 02, 2011 2:23 am UTC
Forum: Coding
Topic: Texas Holdem
Replies: 6
Views: 1601

Texas Holdem

I'm trying to write an algorithm that calculates the odds of starting hand winning. The algorithm is as follows: /* * This function is called for every possible flop and starting hand * * There are 22,100 possible flops and 1,176 possible starting hands * for each flop (dealing flop first). * * Or 1...
by grom
Mon Jul 11, 2011 4:48 am UTC
Forum: Serious Business
Topic: International Date Line
Replies: 12
Views: 4303

International Date Line

Been discussing with friends the IDL and I don't understand why we need both GMT and IDL lines.. Why can't you just have a single line to define both time and date?
by grom
Tue Jan 13, 2009 8:14 am UTC
Forum: Coding
Topic: What language should I learn in 2009?
Replies: 10
Views: 1892

Re: What language should I learn in 2009?

Using whitespace to delimit code blocks is the work of the Devil.


You should be using proper indentation anyway. What's so evil about making it required?
by grom
Sun Jan 11, 2009 4:33 am UTC
Forum: Coding
Topic: What language should I learn in 2009?
Replies: 10
Views: 1892

Re: What language should I learn in 2009?

+1 to Haskell
by grom
Wed Dec 10, 2008 10:52 pm UTC
Forum: Coding
Topic: Project Euler 15
Replies: 9
Views: 4015

Re: Project Euler 15

From my blog: It took me awhile to figure out that this is a combinations problem. Until I realized that once you have chosen the positions of the Rs, then Ds must occupy all the other positions. That is the number of arrangements is just the number of different ways of selecting the positions of th...
by grom
Mon Dec 08, 2008 4:46 am UTC
Forum: Mathematics
Topic: Project Euler 20
Replies: 22
Views: 7854

Re: Project Euler 20

Well I just used haskell and it executes under 2 seconds with the ghc interpreter:

Spoiler:

Code: Select all

import Data.Char

factorial :: Integer -> Integer
factorial 1 = 1
factorial n = n * factorial (n - 1)

main = print $ sum . map (\c -> digitToInt c) . show $ factorial 100
by grom
Thu Dec 04, 2008 8:39 am UTC
Forum: Coding
Topic: Project Euler
Replies: 411
Views: 159710

Re: Project Euler

Here is my haskell solution. primes :: [Integer] primes = 2:3:primes' where -- Every prime number other than 2 and 3 must be of the form 6k + 1 or -- 6k + 5. Note we exclude 1 from the candidates and mark the next one as -- prime (6*0+5 == 5) to start the recursion. 1:p:candidates = [6*k...
by grom
Mon Nov 10, 2008 5:29 am UTC
Forum: Coding
Topic: Having a few problems with a Java Swing GUI
Replies: 8
Views: 1193

Re: Having a few problems with a Java Swing GUI

Solution to #1: Yes you can replace the items listed in JComboBox. You can either do: DefaultComboxBoxModel model = (DefaultComboBoxModel) comboBox.getModel(); model.removeAllElements(); for (Object item : newItems) { model.addElement(item); } Or use a custom model when creating the JComboBox. (eg. ...
by grom
Thu Aug 07, 2008 12:55 pm UTC
Forum: Coding
Topic: What should i wrote Java in?
Replies: 27
Views: 4469

Re: What should i wrote Java in?

There is also emacs. http://www.emacsblog.org/2007/02/13/emacs-jdee-ant-and-the-eclipse-java-compiler/ . And there is also http://flymake.sourceforge.net/ for highlighting of syntax errors. Also I thought I remember seeing something where you can run a server process that monitors for file changes a...

Go to advanced search