8000 Initial stuff by charris · Pull Request #1 · numpy/numpy-dtypes · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Nov 25, 2022. It is now read-only.

Initial stuff #1

Merged
merged 70 commits into from
May 7, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
a27a4b5
Add (partial) analysis of minimal continuous poker
girving Nov 24, 2011
0d74b4a
Start heads up Nash equilibrium computation
girving Nov 24, 2011
55d081e
heads-up: Add a --bet option
girving Nov 24, 2011
37ad3f7
heads-up: Add exact Nash equilibrium computation via linear programming
girving Nov 24, 2011
2958e4f
heads-up: Fix error in exact Nash equilibrium computation
girving Nov 24, 2011
1ae2dcb
heads-up: Print out nice strategy summaries
girving Nov 24, 2011
51f52cd
heads-up: Add --max option
girving Nov 26, 2011
49cf276
crunch: Compute exact hand vs. hand probabilities ignoring suits
girving Nov 26, 2011
61b9c9d
crunch: Minor tweaks
girving Nov 26, 2011
44efce5
Extend exact probability computation to include suits
girving Nov 27, 2011
37876d6
Add exact win results
girving Nov 27, 2011
f3982f7
exact: Add a regression test
girving Nov 27, 2011
ed624a2
exact: Add an optional multiple argument to exact test
girving Nov 27, 2011
d677f2e
exact: Switch to suit-value major order for card bit sets
girving Nov 27, 2011
a2a7386
exact: Remove old_score_t and update regressions accordingly
girving Nov 27, 2011
da7ff4a
Makefile: add a clean target
girving Nov 27, 2011
849b951
exact: Delete unused function
girving Nov 27, 2011
ff3b494
Add a license
girving Nov 27, 2011
66a9b81
exact: Fix compare_hands for suit-major order
girving Nov 27, 2011
8000
9129f3d
exact: Add OpenCL support
girving Nov 28, 2011
019bc1b
exact: Switch over to pure OpenCL
girving Nov 28, 2011
4e5befb
exact: Delete OpenMP support
girving Nov 28, 2011
ad4069b
exact: Switch to hashing scores in OpenCL
girving Nov 28, 2011
bcebba9
exact.cl: Remove all branching
girving Nov 28, 2011
ae5e2cd
Vectorize all OpenCL code
girving Nov 28, 2011
f05bb37
exact: Don't recompute equivalent cases when looping over suits
girving Nov 28, 2011
91bb26f
Use all available OpenCL devices for hand comparison
girving Nov 28, 2011
abb8497
Add timer code
girving Nov 29, 2011
67dbc0d
Restructure code to allow score computation on the host
girving Nov 29, 2011
d40db80
Discovered that terminal output is a nontrivial performance hit
girving Nov 29, 2011
10d086b
Switch to the C++ OpenCL API
girving Nov 29, 2011
fecd741
Soften compiler options now that only OpenCL matters
girving Nov 29, 2011
ad4d5ed
Remove mention of pokerstove's win probabilities
girving Nov 29, 2011
f521d7d
Write a better README and improve usage information
girving Nov 29, 2011
123c3e1
score.h: Label functions with approximate operation counts
girving Nov 29, 2011
dcd5d55
exact.cpp: Count total number of hand comparisons performed
girving Nov 29, 2011
e6d18b5
score.h: Implement max_bit using clz
girving Nov 29, 2011
a0deb36
score.h: Fix an operation counting mistake
girving Nov 29, 2011
b884402
score.h: Optimize all_straights
girving Nov 29, 2011
9d92675
score.h: Optimize detection of trips
girving Nov 29, 2011
daef352
score.h: Optimize pair detection
girving Nov 29, 2011
e5eb89a
score.h: Remove two unnecessary parentheses
girving Nov 29, 2011
b033b72
heads-up: Remove the slowest, inaccurate way to compute payoffs
girving Dec 1, 2011
5de45d6
Implement a custom linear programming solve to get exact arithmetic
girving Dec 2, 2011
574a3a7
Add fixed precision rational number support to numpy
girving Dec 4, 2011
2594edf
exact: Add a -n/--nop option for quick calculation of total cost
girving Dec 10, 2011
11e0ff2
heads-up: Slight optimizations
girving Dec 10, 2011
4cbedee
heads-up: Add computation of exact strategy vs. an always all-in player
girving Dec 10, 2011
f3a6ce7
heads-up: Make -d/--deterministic a clean option
girving Dec 10, 2011
9951516
heads-up --donkey: Optionally show worst call hand
girving Dec 10, 2011
2b70238
heads-up: Add a -p/--profile option for use with --donkey
girving Dec 11, 2011
ae4a6e8
heads-up: Switch to sparse matrices for --donkey
girving Dec 12, 2011
69a176c
heads-up: Add computation of the limit equity curve vs. always all-in
girving Dec 12, 2011
89388d3
rational: Fix a nondetermistic bug in rational parsing
girving Dec 17, 2011
671f70a
Add variable bet Nash equilibrium computation
girving Dec 17, 2011
2a79482
heads-up: Allow --bets without --variable
girving Dec 17, 2011
e4bb64f
heads-up: Remove unnecessary variables from variable bet code
girving Dec 18, 2011
41edd65
heads-up: Replace C and c with explicit eye/1
girving Dec 18, 2011
88f5831
README.md: Add a note about cvxopt being GPL
girving Dec 19, 2011
7ed8d81
Cache variable bet nash equilibia to allow fast reruns
girving Dec 20, 2011
f007836
Add one plot output for variable bet equilibria
girving Dec 20, 2011
2a4999a
Add .DS_Store to .gitignore
girving Dec 20, 2011
1cec153
Strip away everything but rational numbers
girving Dec 20, 2011
940786e
Convert from C++ to C
girving Dec 21, 2011
5aa13c5
Disable GIL acquiring by default
girving Dec 21, 2011
c250584
Remove C++ style comments and change inline to NPY_INLINE
girving Dec 21, 2011
06e3b25
Reformat declarations and blocks to match numpy
girving Dec 21, 2011
42073cf
Change Python assert to numpy.testing.assert_
girving Dec 21, 2011
cfca318
ENH: Merge branch 'tmprat' into initial-stuff
charris May 7, 2012
8e18ac4
STY: Break some long lines.
charris May 7, 2012
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions npytypes/rational/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Copyright 2011, Geoffrey Irving, Eugene d'Eon.

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 changes: 10 additions & 0 deletions npytypes/rational/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
all: rational.so

rational.so: rational.c
python setup.py build
cp build/lib.*/rational.so .

.PHONY: clean test

clean:
rm -f *.o *.E *.so
30 changes: 30 additions & 0 deletions npytypes/rational/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Test code for user defined types in Numpy
=========================================

This code implements fixed precision rational numbers exposed to Python as
a test of user-defined type support in Numpy.

### Dependencies

* [python](http://python.org)
* [numpy](http://numpy.scipy.org): Requires a patched version (see below)
* [py.test](http://pytest.org): To run tests

On a Mac, these can be obtained through [MacPorts](http://www.macports.org) via

sudo port install py26-numpy py26-py

The original version of this code exposed several bugs in the (hopefully) old
version of numpy, so if it fails try upgrading numpy. My branch which fixed
all but one of the bugs uncovered is here:

https://github.com/girving/numpy/tree/fixuserloops

These changes should be incorporated in the main numpy git repo fairly soon.

### Usage

To build and run the 4930 tests, do

make
py.test
Loading
0