-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relative imports / DLLs #4
Comments
Can you let me know what you did exactly, so that I can at least try to reproduce this issue? |
Hi Antony, Thanks for the reply - I appreciate it! I used "deal" successfully about a year ago but when I tried to reuse it I I uninstalled my old Python version and downloaded Python35 for Windows 7 Initially I didn't have colorama, but I managed to get that installed OK (I I added the redeal-master\redeal to %PATH% and then tried to run as follows: C:\Users\DLyons\Downloads\redeal-master\redeal-master\redeal>redeal.py I read various posts about relative vs absolute imports and it wasn't clear That got me to the point of generating the DDL errror which typically seems Best, Donal. On 21 September 2015 at 17:30, Antony Lee [email protected] wrote:
|
P.S. Same issue arose when trying to run from IDLE Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64
|
I'm currently playing in Montpellier and have just joined the FFB
Donal.
|
You need to be in the folder that contains the For the 32 vs. 64-bit part, indeed DDS only releases a 32-bit build on Windows (and I have no way to build a 64-bit DLL for Windows), so you need a 32-bit Python to use this. Note that you can perfectly install a 32-bit Python on 64-bit Windows, everything will work fine. I will update the docs accordingly. |
Or similarly C:\Users\DLyons\Downloads\redeal-master\redeal-master>python -m redeal |
Many thanks Antony, That fixes the two issues I was having. I do get a new error, but that's C:\Users\DLyons\Downloads\redeal-master\redeal-master>python -m redeal Best, Donal. On 21 September 2015 at 23:59, Antony Lee [email protected] wrote:
|
Just as a quick fix I've changed global_defs to class Suit(_Enum): and the script is now working. Many thanks, Donal. On 22 September 2015 at 00:37, Donal Lyons [email protected] wrote:
|
Yup, but Linux consoles can display suit symbols properly. I was checking for this capability incorrectly, should be fixed now. Also included a better error message on Windows 64-bit. |
Antony,
I think I'm misinterpreting something here, It looks to me like, of the 40
deals, 6 have a 6-card spade suit, 6 have a 5-card spade suit. 5 have a
4-card spade suit,
7 have a 3-card spade suit, 11 have a 2-card spade suit, 3 have a 1-card
spade suit and 2 have spade voids.
I was expecting that all 40 would have had a 5-card spade suit out of 120
hands generated i.e. a success rate of 33.3% (which seems high - wouldn't
one expect it to be about 11%?
Best,
Donal.
|
How did you generate the hands?
Each of the North hands has 12+HCP and 5S. Again, if you have any suggestions on how to clarify the README, please let me know. |
OK - I see how I was misreading it now. It's 10 sets of 4 deals, not 40 N I'll get back to you re possible clarification. Donal. On 23 September 2015 at 01:08, Antony Lee [email protected] wrote:
|
Try |
I took the data from your example at https://github.com/anntzer/redeal The first col is the N hand and seems to contain 4 hands with a six card On 23 September 2015 at 02:51, Antony Lee [email protected] wrote:
|
The acceptance condition is |
Line 75 I think needs to be changed to
"for seat in global_defs.Seat:"
|
And in two other places? The gui then throws an error On 23 September 2015 at 11:16, Donal Lyons [email protected] wrote:
|
I don't actually use the GUI so the code tends to fall behind; thanks for noticing the bugs. Should be working now. |
Thanks for that Antony. Not sure how often I'll use the GUI myself, but I It worked as expected once I removed the quotes! Donal. On 23 September 2015 at 19:15, Antony Lee [email protected] wrote:
|
Antony, Finally, a more in-depth question. Your _solve_board is a wrapper for Anyway, the error I'm getting is: Best, Donal. On 23 September 2015 at 20:10, Donal Lyons [email protected] wrote:
|
Maybe this is related to 32-bit dll on 64-bit machine? Googling threw up Donal. On 24 September 2015 at 11:04, Donal Lyons [email protected] wrote: Finally, a more in-depth question. Your _solve_board is a wrapper for Anyway, the error I'm getting is: |
Antony, I thought the problems I was having might be due to a mix of 32 and 64 bit, Mostly it seems OK on the examples (it's years since I've worked with dlls But there are still three examples which throw similar errors C:\Users\DLyons\Downloads\redeal-master\redeal-master>python -m redeal |
Antony, The documentation is looking good. I see you've put in some 64-bit checks into the sources - also good. I have no idea what the following really means but might it be related to I note that WinDLL occasionally appears in the sources. Best, Donal. On 25 September 2015 at 19:42, Donal Lyons [email protected] wrote:
|
https://www.google.ie/search?num=100&lr=&safe=images&as_qdr=all&q= On 25 September 2015 at 22:40, Donal Lyons [email protected] wrote:
|
Sorry, I'm a bit busy right now and will get back to the issues later. |
There's no urgency on any of this. You should have the 64-bit dll attached to one of the mails. If not let me On 25 September 2015 at 22:45, Antony Lee [email protected] wrote:
|
I did not receive the DLL. |
Should be attached now. On 25 September 2015 at 23:28, Antony Lee [email protected] wrote:
|
Attachments are lost when you email them via github. Can you put it on Dropbox or a similar service, and post a public link? |
Can you get it from https://www.dropbox.com/s/ujeluzyjrts8g6z/DDS.dll?dl=0 On 26 September 2015 at 01:17, Antony Lee [email protected] wrote:
|
Got it, thanks. |
I tried again the 32bit DLL with 32bit Python on Windows(64bit) and |
That's odd - I'll try the 32 bit again and see. I installed 35 35 and haven't tested under 34.. On 26 September 2015 at 02:09, Antony Lee [email protected] wrote:
|
OK - I found that my PATH was totally corrupt (nothing to do with Python) I tried dropping down to Python 2.7 to see if my issues were resolved, but So I'll move back up to 3.5 32-bit and work from there. Re documentation I discovered that I don't understand the following - it's On 26 September 2015 at 04:53, Donal Lyons [email protected] wrote:
|
Anthony,
Seems to have been the corrupt PATH issue.
Many thanks for all the help.
Donal.
|
I've rebuilt under 3.5 with an explicit linker path to VCRUNTIME140.DLL . On 26 September 2015 at 02:09, Antony Lee [email protected] wrote:
|
Hi Antony,
Redeal has been working fine for me thanks. I've generated some Soutien
mineur inversé files and would like to pass them on to my partner in PBN
format.
As far as I can see, SHORT is the closest to that and it's no big deal for
me to do the conversion myself, but maybe PBN can be specified from the
command line and I'm just missing something.
FYI, you're now listed on
http://www.lajollabridge.com/Software/FreeSoftware.htm
Best,
Donal.
|
Thanks Antony, I'll give that another go. I did part of what you suggest but something Best, Donal. On 12 October 2015 at 08:05, Antony Lee [email protected] wrote:
|
Thanks Antony, For the moment, I've just kludged it to meet my immediate needs. All hands and http://www.jazclass.aust.com/bridge/scoring/score11.htm Best, Donal. On 12 October 2015 at 09:29, Donal Lyons [email protected] wrote:
|
See latest version for PBN support.
or in the GUI. Let me know if it works. |
Thanks Antony, The PBN format seems fine - see the first line below. But it now doesn't seem to be finding my definition file (with the accept [Deal "N:AK.K765.KQJT72.K Q98653.AQ42.6.Q3 4.J98.A985.T9872 Tries: 50 C:\redeal-master\redeal>redeal -fpbn -n50 examples/smi.py Best, Donal. On 13 October 2015 at 20:20, Antony Lee [email protected] wrote:
|
As you said, it works fine when run as C:\redeal-master>python -mredeal -fpbn smi.py On 13 October 2015 at 21:03, Donal Lyons [email protected] wrote:
|
Included your DLL in the latest commit. Still doesn't work for Python 64bit <3.5, but it's good enough for me. |
OK - when I get some time I'll rebuild and test. My youngest son is Donal. On 13 October 2015 at 23:19, Antony Lee [email protected] wrote:
|
What I'm currently looking at is a case where, at trick 3, the West
declarer discovers a bad trump break. Given the play to date, I'd like to
look at double dummy results for the continuation.
I've done simulations where the full East and West hands are input and have
generated stats for those. I'd like to do something similar for the
10-card ending.
Is that possible within redeal?
This technique would incidentally solve miniatures such as
For example http://tedmuller.us/Bridge/Puzzles/M02-TheWhitfieldSix.htm
Regards,
Donal.
P.S. I've lost track of which software versions I'm using, but whatever
they are calls to DDS seem to be working OK on a 64-bit Windows 7 machine.
|
Although the underlying engine can certainly solve miniatures, specialized programs such as Bridge Calculator (which I like a lot) are probably better suited/simpler to use.
and then the DDS would run on top of that? |
Thanks Antony. That's a new program for me - thought I knew most of what was out there :-) I'll think about your code snippet. Much appreciated, Donal. On 14 November 2015 at 18:44, Antony Lee [email protected] wrote:
|
Just to be clear: I don't have this functionality implemented yet. I am asking you for your opinion as to what programming interface would be most usable. |
I haven't thought this through. I'm currently looking at -W "AKQT8 KQ3 AQT2 So, ideally all that would go into the "accept". I'd then envisaged On 14 November 2015 at 18:55, Antony Lee [email protected] wrote:
|
What was the lead and who's declarer? |
Sorry W declarer, contract 6S, lead JH. On 14 November 2015 at 19:37, Antony Lee [email protected] wrote:
|
From a bridge POV, looks like heart ace and diamond to queen. If it wins cash SA DA and ruff two diamonds is basically cold, if not they can return a club which is probably best -- I don't think I can cater for everything so I need to guess which minor to finesse. I have a few other things on my plate but I'll get back to you once I implement this. |
The two top trumps by my partner at least had the merit of showing the bad Me, I'd probably then have run the 9D (if S covers, then W also covers). My stats says 6S is about 85% a priori. Given the 4-1 trump break, that In practice, I wonder about leading small to the 9D and waiting for the It's hard to evaluate the success conditions of the various lines of play On 14 November 2015 at 19:57, Antony Lee [email protected] wrote:
|
Ah, it's matchpoints. In which case my line becomes much less attractive as it basically gives up on any chance for an overtrick (most likely there will be a diamond overruff, which I would welcome at IMPs). |
Yes, the gambler in me much prefers matchpoints. Case in point last week So wouldn't any red-blooded male bid 3NT? Apparently not - "On ne joue pas I misplayed it to make only one overtrick (98% as opposed to 100%). On 14 November 2015 at 21:51, Antony Lee [email protected] wrote:
|
Script fails for me due to SystemError: Parent module '' not loaded, cannot perform relative import.
I had probably worked around that, but then started to get "is not a valid Win32 application" due to dll_path issues. Probably some mix of Python55 and a Windows 64-bit machine but too time intensive to try and resolve.
The text was updated successfully, but these errors were encountered: