RazorTorque4X Posted February 28, 2010 Share Posted February 28, 2010 This is a simple tic tac toe game, though not simple to say, cause it presents an AI that computer will use while making its move, here is the link to C++ code LinkI tried to make AutoIt equivalent code for this, but it fails just in the last function, where computer calculates its move using AI.Can any one tell me what is the error in that function.Here is what I have done.( See the file )The code might be a bit long but the the error is just in _Evaluate() function rest is the GUI and other function.Please can anyone help me point out the error. Any little (or big) help is appreciated . tic tac ai.au3 Link to comment Share on other sites More sharing options...
Bowmore Posted February 28, 2010 Share Posted February 28, 2010 You have forgotten to change the brackets around the array elements in that function from () to [] for example $aAry(7) should be $aAry[7]. "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
monoceres Posted February 28, 2010 Share Posted February 28, 2010 Where did you get the impression that was C++!? Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
RazorTorque4X Posted February 28, 2010 Author Share Posted February 28, 2010 You have forgotten to change the brackets around the array elements in that function from () to [] for example $aAry(7) should be $aAry[7]. Hey, thanks for pointing out but there are still @errors. The main @error is _Evaluate called with wrong no. of arguments. But as far as I can see is that in the link too, first time there are no. args, but second time the function is called with RecursiveScore Argument. So, that' the main problematic issue ! Or am I completely off the track...? Link to comment Share on other sites More sharing options...
RazorTorque4X Posted February 28, 2010 Author Share Posted February 28, 2010 Where did you get the impression that was C++!?Yeah, I am sorry but I had this code in C++ too ! Though the link is that of VBScript, I didn't really noticed at first and remembered that as I had this code for C++ so must be the one in link... But I don't have that C++ code now....... 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