Juvigy Posted August 25, 2010 Share Posted August 25, 2010 I get error when using the _XPokerEval.twoplustwo.exe - Application failed to start because application configuration is incorrect. XP SP2 32bit Ait 3.3.0.0 The download link is not working for me too. Please upload again. Link to comment Share on other sites More sharing options...
nitekram Posted January 5, 2011 Share Posted January 5, 2011 can we revisit this issue - i had this working before, but now it appears that it cannot find, the function LoadHRDat(). 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
waldoo Posted January 31, 2011 Share Posted January 31, 2011 Hmmm now that I've spent >3h searching for it, I dare to ask if someone could tell me how or where I can get the handranks.dat. My _XPokerEval.twoplustwo.exe seems to be damaged and I can't find it or the .dat file anywhere else... (And don't figure out how to build it on my own...) PLEASE HELP!!!! Link to comment Share on other sites More sharing options...
JRowe Posted January 31, 2011 Author Share Posted January 31, 2011 The original post contains a link to the source article which inspired the whole thing. http://www.codingthewheel.com/archives/poker-hand-evaluator-roundup#2p2 Reading that article should be a prerequisite to using this, anyway. You can get the pre-compiled binaries and the source from the links. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
nitekram Posted January 31, 2011 Share Posted January 31, 2011 Since you replied - can you provide a fix for -ERROR function LoadHRDat() not found? The funny thing is, I know I had this working, and now have time to create a full game - well maybe time 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
waldoo Posted February 2, 2011 Share Posted February 2, 2011 (edited) after hours of annoyance (installing various c++ editors etc.), here we go! XPokerEval.TwoPlusTwo.exe.zip (Rapidshare)Unfortunately, I have the same problem...RandomHandGenerator.au3 (13) : ==> Unknown function name.:$dat = LoadHRDat()$dat = ^ ERROR Edited February 2, 2011 by waldoo Link to comment Share on other sites More sharing options...
nitekram Posted February 2, 2011 Share Posted February 2, 2011 (edited) after hours of annoyance (installing various c++ editors etc.), here we go! XPokerEval.TwoPlusTwo.exe.zip (Rapidshare)I am not sure you are replying to my post or not, but i have the DAT file it is the DLL that is having issues, or updated version of AutoIt, or because the function PluginOpen() is not supported? Not sure?Here is the line in OP code: $handEval = PluginOpen("handEval.dll")But like I said, I get and error about a function inside the dll that cannot be found.Also, I am sorry, I will not be able to download your EXE. To see if it works, maybe someone else can and post the results.EDIT - now you make mine thread obsolete lol. Edited February 2, 2011 by nitekram 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
JRowe Posted February 3, 2011 Author Share Posted February 3, 2011 Probably something to do with a visual studio runtime. Even if its not a runtime issue, it's trivial to get it working from scratch. Besides, creating a normal dll and using dllCall makes more sense now than using plugins. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
waldoo Posted February 3, 2011 Share Posted February 3, 2011 (edited) Ah sorry nitekram, I didn't expect you to respond so quickly... ^^ However, it seems we are now pulling the same string... @JRowe: What would you recommend me to do? What do you mean with creating it from the scratch?? As you might figure out, my programming skills are somehow limited and I've never created a .dll myself - hell, days ago I didn't even know what they are for... ^^ However, I'm willing to learn if I have to... Edited February 8, 2011 by waldoo Link to comment Share on other sites More sharing options...
Geir1983 Posted February 3, 2013 Share Posted February 3, 2013 Hi guysI see alot of people having troubble getting this to work so I will share how i got it running. I also had troubble with generating the HandRanks.dat so after some googling i found a copy at Github.. When i finaly found it I got another error that is mentioned alot in this tread:RandomHandGenerator.au3 (13) : ==> Unknown function name.:$dat = LoadHRDat()$dat = ^ ERRORI tried installing alot of the visual studio 2008 c++ (and others) redistributables without any luck. However i decided to try the complete Visual Studio 2008 C++ Express version and it worked!! (After this i could also generate the handranks table so downloading this file was not needed.) Link to comment Share on other sites More sharing options...
Malkey Posted February 7, 2013 Share Posted February 7, 2013 @Geir1983Thanks for that. You are correct. Installing the complete Visual Studio 2008 C++ Express version enabled XPokerEval.TwoPlusTwo.exe to create the HandRanks.dat data file.However for my system, "Language:0409 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64", I had to add and modify this:-#AutoIt3Wrapper_UseX64=N #AutoIt3Wrapper_Plugin_Funcs =LoadHRDat, AnalyzeHandNote the space after "#AutoIt3Wrapper_Plugin_Funcs" and before the equal sign. The script does not work without that space.Strange BehaviourWith this script working, the $handEval variable in $handEval = PluginOpen("handEval.dll") contains a zero. From the help file, this means the PluginOpen function failed: and,The PluginClose function returns "True" and not "1" as per the help file. Link to comment Share on other sites More sharing options...
Geir1983 Posted February 9, 2013 Share Posted February 9, 2013 (edited) Glad I could help I run a virtual machine with 32 bit OS so i did not have any troubble with 64 bit OS.Not sure if I am doing something wrong or just dont understand the return types from the analysis. When analyzing 5 and 6 card i get hand categories that are not within 1-9 range. Is it some other bitshift operation that is needed for the return of functions "AnalyzeHand5" and "AnalyzeHand6" perhaps?Here is an example of my return:12:31:13, Startup12:31:14, Dealt Hand: Kc, Td12:31:14, ChenStartHandFormula() rating: 6 of hand: Kc - Td12:31:14, Dealt Flop: Th, 8s, 4d12:31:14, AnalyzeHand5() My Hand Category: 2665, My Category Strength: 306112:31:14, Dealt Turn: 8d12:31:14, AnalyzeHand6() My Hand Category: 6646, My Category Strength: 286512:31:14, Dealt River: Ad12:31:14, AnalyzeHand() My Hand Category: 3, My Category Strength: 38512:31:14, Complete Hand: Kc, Td - Th, 8s, 4d, 8d, AdAny suggestions?Edit:@Malkey: For the PluginOpen i used this:$handEval = PluginOpen(@ScriptDir & "handEval.dll") Edited February 9, 2013 by Geir1983 guestscripter 1 Link to comment Share on other sites More sharing options...
Geir1983 Posted February 10, 2013 Share Posted February 10, 2013 (edited) Found out that the functions AnalyzeHand5 and AnalyzeHand6 returned wrong values, no bitshift or bitmasks would correct it. When compiling the source (http://www.codingthewheel.com/file.axd?file=XPokerEval.zip) I could get correct values for 5 and 6 hand evaluation. I have now compiled a new version compatible to the original evalHand.dll function, but I think it needs some memory cleanup routines before I will upload it (first ever au3 Plugin i created).New function results:12:47:50, Dealt Hand: 9c, Kd12:47:50, ChenStartHandFormula rating: 4 of hand: 9c - Kd12:47:50, Dealt Flop: 4c, Js, 9h12:47:50, AnalyzeHand5() My Hand Category: 2, My Category Strength: 169112:47:50, Dealt Turn: 9d12:47:50, AnalyzeHand6() My Hand Category: 4, My Category Strength: 51612:47:50, Dealt River: 4h12:47:50, AnalyzeHan() My Hand Category: 7, My Category Strength: 8712:47:50, Complete Hand: 9c, Kd - 4c, Js, 9h, 9d, 4hEdit:I uploaded the new dll file including the source for the dll if someone cares to clean up the dll. Edited February 10, 2013 by Geir1983 Link to comment Share on other sites More sharing options...
Geir1983 Posted February 10, 2013 Share Posted February 10, 2013 File Name: handEval.dllFile Submitter: Geir1983File Submitted: 10 Feb 2013File Category: LibrariesBased on the plugin for two pluss two poker evaluation, found in this forum (rebuilt dll because of wrong return from 5 and 6 hand evaluation): Link to comment Share on other sites More sharing options...
nitekram Posted February 28, 2013 Share Posted February 28, 2013 So the only way to get this to work is with a new updated DLL - this does not compute (though it may fix the hand issues with 5 and 6 hands, it does not answer the DLL file issue. I have always had all the files and swear that it worked for a while - then maybe AutoIt changed (I updated to newer version?) but anyway that is when the error started.Unknown function name.:$dat = LoadHRDat()$dat = ^ ERRORI assumeed it was something to do with the calling of the DLL with CallDLL() - I think that was the function. But it still does not answer how it was able to work with just opening the file in Visual Studio 2008 C++ Express. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
JohnOne Posted February 28, 2013 Share Posted February 28, 2013 I once tried to make a simple console based poker game, would this be any good to calculate which player won the game? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
nitekram Posted March 5, 2013 Share Posted March 5, 2013 It would!!! I have created my own code to do what this is doing, and it works - though I am sure that it is not as fast as this method. I will be posting my code soon, as soon as I finish the AI for the players. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
Geir1983 Posted March 14, 2013 Share Posted March 14, 2013 I assumeed it was something to do with the calling of the DLL with CallDLL() - I think that was the function. But it still does not answer how it was able to work with just opening the file in Visual Studio 2008 C++ Express.Sorry if I was not clear enough, but you need to install Visual Studio 2008 C++ Express on the same machine as you are executing your script.By the way, regarding speed.. The original method is super fast, but the dll call etc from autoit is making it slow(er). For my purpose it is still fast enough, but i think it has lost alot of the speed. So the original test enumerating all 133 mil hands completed in 1200ms executed as C++ code, in my project where it is converted to autoit dll 130 k calls of the routine needs 3-4 seconds to complete (however my method is doing alot of other lines of code in the same loop so not directly comparable). For my needs its fast enough, but it is not the same as the original source. Link to comment Share on other sites More sharing options...
likehu Posted May 1, 2015 Share Posted May 1, 2015 Hello,I am trying to make it work nowadays and stuck as it usually happens with newbie. I have created the 123 MB HandRanks.dat file (VS2008 c++ express edition needed). The PluginOpen/PluginClose functions is not supported anymore so I have replaced it with DLLOpen/DllClose in RandomHandGenerator.au3 from "Poker Hand evaluator plugin" Geir1983. Also I have replaced;line 17 $dat = LoadHRDat() ;line38 $Analysis = AnalyzeHand($myHand[0], $myHand[1], $myHand[2], $myHand[3], $myHand[4], $myHand[5], $myHand[6])with$dat = DllCall($handEval, Int, 'LoadHRDat') $Analysis = DllCall($handEval, int, 'AnalyzeHand', int, $myHand[0], int, $myHand[1], int, $myHand[2], int, $myHand[3], int, $myHand[4], int, $myHand[5], int, $myHand[6]) and after this script starts but after clicking "Deal new hand" stops with error Starting file RandomHandGenerator.au3... "D:\Downloads\PokerEval\PokerEval\RandomHandGenerator.au3" (50) : ==> Variable subscript badly formatted.: $k = $k + $Category[$j] $k = $k + $Category[^ ERRORReturn type "int" in DllCall was choosed randomly as script starts with it and dont start with "string" type for example. Maybe I am wrong here.After this I have tried to change;line 42 For $j = 8 to $HandCategory-1 step -1 $k = $k + $Category[$j] Next ;line 49 MsgBox(0,"1", $HandString & @CRLF &"Type of Hand:"&$HandRanksArray[$position][0] &@CRLF& "Best 5 Card Hand:"& $HandRanksArray[$position][2] &@CRLF& "Generated and evaluated Hand in :" & $dif & " milliseconds." & @CRLF & "Hand Strength:" & Round(100*($HandRankWithinCategory/($Category[$HandCategory-1]))) & "%")toFor $j = 8 To $HandCategory Step -1 $k = $k + $Category[$j] Next MsgBox(0, "1", $HandString & @CRLF & "Type of Hand:" & $HandRanksArray[$position-1][0] & @CRLF & "Best 5 Card Hand:" & $HandRanksArray[$position-1][2] & @CRLF & "Generated and evaluated Hand in :" & $dif & " milliseconds." & @CRLF & "Hand Strength:" & Round(100 * ($HandRankWithinCategory / ($Category[$HandCategory]))) & "%") and script always show the same evaluation result but random 7 cards were generated.It always show:type of hand: High Cardbest 5 card hand: 75432Hand strength: 0% Please help to make it work. :) RandomHandGenerator.au3 Link to comment Share on other sites More sharing options...
Jfish Posted May 15, 2015 Share Posted May 15, 2015 Not to necro post but it looks like you have not gotten a response so I thought I would let you know your post/question inspired me to create a different poker script that I placed here: https://www.autoitscript.com/forum/topic/170414-pokerlogicau3/ in case you want to try it. It is all native au3 with no dll. Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now