Navision 4 On a row v. beta093
4 on a row, Navision Financials/ Attain Game.
This is a beta version off one game we a missing in Navision
Have FUN
I am working on the Lan version, if you have comment to the game or other thing, feel free to contact me.
http://www.mibuso.com/dlinfo.asp?FileID=423
Discuss this download here.
Comments
If it was hard to write, it should be hard to understand."
4 on a row, version 1.00, Navision Financials/ Attain Game.
Have FUN
If you have comment to the game or other thing, feel free to contact me.
http://www.mibuso.com/dlinfo.asp?FileID=423
Discuss this download here.
4 on a row, version 1.01, Navision Financials/ Attain Game.
Have FUN
If you have comment to the game or other thing, feel free to contact me.
Version 1.01:
Minor bug fixed!
http://www.mibuso.com/dlinfo.asp?FileID=423
Discuss this download here.
but it's too slow using hard :oops: :oops: becouse you test all possible combination... instead using AI tecnique (classic for computer player in game implementation) or almost dynamic programming tecnique (working with graph etc...) ? :shock:
If I have some time to spend ( :?: :?: :?: ) I'll post you a new version using this tecnique....
Probably it's due to an uninitialized variable in the procedure startgame (I think Color giving a short look at the code) becouse at button press (1-7) Col(1,Player) is executed and the message depend on it:
IF Color THEN
MESSAGE(Text003,PlayerName)
ELSE
MESSAGE(Text003,VsName);
It's another thing I want to adjust...always if I find some time to spend...
The new version is now ready. How can I post the file?? Is it possible??
Changes are reported here (between the comment lines). The most important is "Player := TRUE;", but also the others are not bad.
NewGame - OnPush()
StartGame;
CurrForm.NewGame.ENABLED := FALSE;
// Pedrocchi Dario
CurrForm.NewGame.ENABLED := FALSE;
WeGotAWinner := FALSE;
CurrForm.VPlayer.EDITABLE := FALSE;
Player := TRUE;
// End of Pedrocchi Dario
IF HostGame THEN
Yourturn := TRUE;
If you can change the AI code to make it faster and better, it be nice =D>
New version 1.02 is on it way, with the fix from Pedrocchi Dario
\:D/
Flemming R. Petersen
Denmark
4 on a row, version 1.02, Navision Financials/ Attain Game.
Have FUN
If you have comment to the game or other thing, feel free to contact me.
http://www.mibuso.com/dlinfo.asp?FileID=423
Discuss this download here.
You might be interested in my version of "Connect 4" as well? You can find it here: http://www.mibuso.com/dlinfo.asp?FileID=1531
I plaid several games between my program and this one, and I must say my program was faster and was winning. It's only calculating max. 2 steps ahead ("If I do this, can I win for sure at my next move?"), but for the rest it is searching for possibilities and chooses for the move with the most points (based on my criteria). For example, 3 on a row and one empty has more value if below the empty field is another empty field (otherwise the opponent can fill it up easily). Another thing that counts is the even or uneven row. The one who starts will finally get the uneven rows in the last column that will be filled up, and the one who didn't start will get the even rows. This means that the uneven rows have more value for the empty field in a potential line-of-4 for the one who started, and vice versa.
It is also not giving away its own 'traps' ("If my opponent is doing column X, can I win directly by doing column X as well? If yes, I will not do column X and wait for my opponent to do X...").
It is also using all historic games: each winning move for a certain position on the board gets (a lot) extra points, and each move for a certain position that ends up losing gets negative points. This mechanism helps the program to improve: you can never win two times in exactly the same way! Try it out!
Regards,
Peter