Advertisement

Results for "Author: bill soo"

2002ASP #4224
A Gomoku game with AI

This is a game of Gomoku. Traditionally, Gomoku is like a game of Tic-Tac-Toe except that you have to get 5 in a row and the playing board is either a 15x15 or a 19x19 GO board. For the purposes of this game, the board size is adjustable from 6x6 to 19x19 and the number needed to win is adjustable from 3 to 6. In a real Gomoku game, you have to have EXACTLY 5 in a row; 6 or more do not count. But for this game, 5 (or whatever) or more win. The game demonstrates how to set up an evaluation function, how to set up a minimax search and how to prune using the alpha-beta algorithm. The game looks ahead a certain number of plys (adjustable from 1 to 6) and picks the best move it can. Since a 15x15 board with 4 plys has up to 2.4 BILLION combinations, pruning the tree becomes important. The game does this by using the alpha beta algorithm. The algorithm works by comparing the value against a limit. If the limit is exceeded, the algorithm abandons the branch. An example in chess would be something like: move (A) has been examined and will, at worst, capture a pawn. We now examine move (B). If we find that in one variation, move (B) will lose a pawn, we abandon the branch, even if at best, move (B) could capture a queen. The reason is because we assume our opponent will do the smartest possible move so we are going to lose a pawn, which is worse than gaining a pawn with move (A). I wrote this in a bit of a hurry (I intend to use it as example source code in my resume) so I haven't finished commenting it yet. So please ask if you have any questions. Oh yeah, please vote for me if you like it. Also, if you beat the game on 4 ply or higher, let me know.

2002ASP #4225
Fast Graphics with Direct Memory Access (DMA)

Graphical operations are amoung the slowest and most cpu intensive tasks a program can do. Using API calls over the native VB Methods can increase speed by several times, but you can get even better performance with Direct Memory Access (DMA). This project encapsulates DMA operations into a simple ActiveX DLL which converts a stdPicture object into an array. You then manipulate the array to change the picture.

2002ASP #4226
Kaleidescope

This code demonstrates the technique of writing direct to graphical memory in a Kaleidescope. The technique basically maps an array to a bitmap address. Changes to the array then affect the bitmap. I first saw this method used by Simon Price.

2002C #12828
A Gomoku game with AI

This is a game of Gomoku. Traditionally, Gomoku is like a game of Tic-Tac-Toe except that you have to get 5 in a row and the playing board is either a 15x15 or a 19x19 GO board. For the purposes of this game, the board size is adjustable from 6x6 to 19x19 and the number needed to win is adjustable from 3 to 6. In a real Gomoku game, you have to have EXACTLY 5 in a row; 6 or more do not count. But for this game, 5 (or whatever) or more win. The game demonstrates how to set up an evaluation function, how to set up a minimax search and how to prune using the alpha-beta algorithm. The game looks ahead a certain number of plys (adjustable from 1 to 6) and picks the best move it can. Since a 15x15 board with 4 plys has up to 2.4 BILLION combinations, pruning the tree becomes important. The game does this by using the alpha beta algorithm. The algorithm works by comparing the value against a limit. If the limit is exceeded, the algorithm abandons the branch. An example in chess would be something like: move (A) has been examined and will, at worst, capture a pawn. We now examine move (B). If we find that in one variation, move (B) will lose a pawn, we abandon the branch, even if at best, move (B) could capture a queen. The reason is because we assume our opponent will do the smartest possible move so we are going to lose a pawn, which is worse than gaining a pawn with move (A). I wrote this in a bit of a hurry (I intend to use it as example source code in my resume) so I haven't finished commenting it yet. So please ask if you have any questions. Oh yeah, please vote for me if you like it. Also, if you beat the game on 4 ply or higher, let me know.

2002C #12829
Fast Graphics with Direct Memory Access (DMA)

Graphical operations are amoung the slowest and most cpu intensive tasks a program can do. Using API calls over the native VB Methods can increase speed by several times, but you can get even better performance with Direct Memory Access (DMA). This project encapsulates DMA operations into a simple ActiveX DLL which converts a stdPicture object into an array. You then manipulate the array to change the picture.

2002C #12830
Kaleidescope

This code demonstrates the technique of writing direct to graphical memory in a Kaleidescope. The technique basically maps an array to a bitmap address. Changes to the array then affect the bitmap. I first saw this method used by Simon Price.

2002VB #21432
A Gomoku game with AI

This is a game of Gomoku. Traditionally, Gomoku is like a game of Tic-Tac-Toe except that you have to get 5 in a row and the playing board is either a 15x15 or a 19x19 GO board. For the purposes of this game, the board size is adjustable from 6x6 to 19x19 and the number needed to win is adjustable from 3 to 6. In a real Gomoku game, you have to have EXACTLY 5 in a row; 6 or more do not count. But for this game, 5 (or whatever) or more win. The game demonstrates how to set up an evaluation function, how to set up a minimax search and how to prune using the alpha-beta algorithm. The game looks ahead a certain number of plys (adjustable from 1 to 6) and picks the best move it can. Since a 15x15 board with 4 plys has up to 2.4 BILLION combinations, pruning the tree becomes important. The game does this by using the alpha beta algorithm. The algorithm works by comparing the value against a limit. If the limit is exceeded, the algorithm abandons the branch. An example in chess would be something like: move (A) has been examined and will, at worst, capture a pawn. We now examine move (B). If we find that in one variation, move (B) will lose a pawn, we abandon the branch, even if at best, move (B) could capture a queen. The reason is because we assume our opponent will do the smartest possible move so we are going to lose a pawn, which is worse than gaining a pawn with move (A). I wrote this in a bit of a hurry (I intend to use it as example source code in my resume) so I haven't finished commenting it yet. So please ask if you have any questions. Oh yeah, please vote for me if you like it. Also, if you beat the game on 4 ply or higher, let me know.

2002VB #21433
Fast Graphics with Direct Memory Access (DMA)

Graphical operations are amoung the slowest and most cpu intensive tasks a program can do. Using API calls over the native VB Methods can increase speed by several times, but you can get even better performance with Direct Memory Access (DMA). This project encapsulates DMA operations into a simple ActiveX DLL which converts a stdPicture object into an array. You then manipulate the array to change the picture.

2002VB #21434
Kaleidescope

This code demonstrates the technique of writing direct to graphical memory in a Kaleidescope. The technique basically maps an array to a bitmap address. Changes to the array then affect the bitmap. I first saw this method used by Simon Price.

ASP_Volume2 #30136
Fast Graphics with Direct Memory Access (DMA)

Graphical operations are amoung the slowest and most cpu intensive tasks a program can do. Using API calls over the native VB Methods can increase speed by several times, but you can get even better performance with Direct Memory Access (DMA). This project encapsulates DMA operations into a simple ActiveX DLL which converts a stdPicture object into an array. You then manipulate the array to change the picture.

ASP_Volume2 #31714
Kaleidescope

This code demonstrates the technique of writing direct to graphical memory in a Kaleidescope. The technique basically maps an array to a bitmap address. Changes to the array then affect the bitmap. I first saw this method used by Simon Price.

ASP_Volume2 #32124
A Gomoku game with AI

This is a game of Gomoku. Traditionally, Gomoku is like a game of Tic-Tac-Toe except that you have to get 5 in a row and the playing board is either a 15x15 or a 19x19 GO board. For the purposes of this game, the board size is adjustable from 6x6 to 19x19 and the number needed to win is adjustable from 3 to 6. In a real Gomoku game, you have to have EXACTLY 5 in a row; 6 or more do not count. But for this game, 5 (or whatever) or more win. The game demonstrates how to set up an evaluation function, how to set up a minimax search and how to prune using the alpha-beta algorithm. The game looks ahead a certain number of plys (adjustable from 1 to 6) and picks the best move it can. Since a 15x15 board with 4 plys has up to 2.4 BILLION combinations, pruning the tree becomes important. The game does this by using the alpha beta algorithm. The algorithm works by comparing the value against a limit. If the limit is exceeded, the algorithm abandons the branch. An example in chess would be something like: move (A) has been examined and will, at worst, capture a pawn. We now examine move (B). If we find that in one variation, move (B) will lose a pawn, we abandon the branch, even if at best, move (B) could capture a queen. The reason is because we assume our opponent will do the smartest possible move so we are going to lose a pawn, which is worse than gaining a pawn with move (A). I wrote this in a bit of a hurry (I intend to use it as example source code in my resume) so I haven't finished commenting it yet. So please ask if you have any questions. Oh yeah, please vote for me if you like it. Also, if you beat the game on 4 ply or higher, let me know.

ASP_Volume2 #36294
Line of Best Fit Demo

The line of best fit is the line that best fits a set of data that is more or less linear. There are a number of ways to calculate this but I'll use the method of sum of least squares. In this method, we find a line where the sum of the square of the distances from the line to each point is minimized. While that sounds complicated to do, the execution is actually quite simple. If you are interested in the derivation of the math, I found a website through GOOGLE that has the required formulas: http://people.hofstra.edu/faculty/S...regression.html For the line of best fit Y = M * X + B: M = (n *Sxy - Sx * Sy) / (n * Sx2 - Sx * Sx) B = (Sy - M * Sx) / n Where: n = number of points Sx = the SUM of all the X coordinates Sy = the SUM of all the Y coordinates Sxy = the SUM of all (x * y) Sx2 = the SUM of all (x * x) So to calculate the line of best fit, set up a bunch of variables like above. Then, everytime you get a new datapoint, update the variables and calculate a line using the equations. You can then check the coefficient of correlation using a formula found on the URL. In the Demo program, you simply click on the form to place data points. The program will then draw a line of best fit based on those data points. Double click on the form to clear it and start anew.

ASP_Volume3 #50679
Kaleidescope

This code demonstrates the technique of writing direct to graphical memory in a Kaleidescope. The technique basically maps an array to a bitmap address. Changes to the array then affect the bitmap. I first saw this method used by Simon Price.

ASP_Volume3 #50680
A Gomoku game with AI

This is a game of Gomoku. Traditionally, Gomoku is like a game of Tic-Tac-Toe except that you have to get 5 in a row and the playing board is either a 15x15 or a 19x19 GO board. For the purposes of this game, the board size is adjustable from 6x6 to 19x19 and the number needed to win is adjustable from 3 to 6. In a real Gomoku game, you have to have EXACTLY 5 in a row; 6 or more do not count. But for this game, 5 (or whatever) or more win. The game demonstrates how to set up an evaluation function, how to set up a minimax search and how to prune using the alpha-beta algorithm. The game looks ahead a certain number of plys (adjustable from 1 to 6) and picks the best move it can. Since a 15x15 board with 4 plys has up to 2.4 BILLION combinations, pruning the tree becomes important. The game does this by using the alpha beta algorithm. The algorithm works by comparing the value against a limit. If the limit is exceeded, the algorithm abandons the branch. An example in chess would be something like: move (A) has been examined and will, at worst, capture a pawn. We now examine move (B). If we find that in one variation, move (B) will lose a pawn, we abandon the branch, even if at best, move (B) could capture a queen. The reason is because we assume our opponent will do the smartest possible move so we are going to lose a pawn, which is worse than gaining a pawn with move (A). I wrote this in a bit of a hurry (I intend to use it as example source code in my resume) so I haven't finished commenting it yet. So please ask if you have any questions. Oh yeah, please vote for me if you like it. Also, if you beat the game on 4 ply or higher, let me know.

ASP_Volume3 #50681
Line of Best Fit Demo

The line of best fit is the line that best fits a set of data that is more or less linear. There are a number of ways to calculate this but I'll use the method of sum of least squares. In this method, we find a line where the sum of the square of the distances from the line to each point is minimized. While that sounds complicated to do, the execution is actually quite simple. If you are interested in the derivation of the math, I found a website through GOOGLE that has the required formulas: http://people.hofstra.edu/faculty/S...regression.html For the line of best fit Y = M * X + B: M = (n *Sxy - Sx * Sy) / (n * Sx2 - Sx * Sx) B = (Sy - M * Sx) / n Where: n = number of points Sx = the SUM of all the X coordinates Sy = the SUM of all the Y coordinates Sxy = the SUM of all (x * y) Sx2 = the SUM of all (x * x) So to calculate the line of best fit, set up a bunch of variables like above. Then, everytime you get a new datapoint, update the variables and calculate a line using the equations. You can then check the coefficient of correlation using a formula found on the URL. In the Demo program, you simply click on the form to place data points. The program will then draw a line of best fit based on those data points. Double click on the form to clear it and start anew.

ASP_Volume3 #50682
Fast Graphics with Direct Memory Access (DMA)

Graphical operations are amoung the slowest and most cpu intensive tasks a program can do. Using API calls over the native VB Methods can increase speed by several times, but you can get even better performance with Direct Memory Access (DMA). This project encapsulates DMA operations into a simple ActiveX DLL which converts a stdPicture object into an array. You then manipulate the array to change the picture.

C_Volume2 #71198
Fast Graphics with Direct Memory Access (DMA)

Graphical operations are amoung the slowest and most cpu intensive tasks a program can do. Using API calls over the native VB Methods can increase speed by several times, but you can get even better performance with Direct Memory Access (DMA). This project encapsulates DMA operations into a simple ActiveX DLL which converts a stdPicture object into an array. You then manipulate the array to change the picture.

C_Volume2 #72776
Kaleidescope

This code demonstrates the technique of writing direct to graphical memory in a Kaleidescope. The technique basically maps an array to a bitmap address. Changes to the array then affect the bitmap. I first saw this method used by Simon Price.

C_Volume2 #73186
A Gomoku game with AI

This is a game of Gomoku. Traditionally, Gomoku is like a game of Tic-Tac-Toe except that you have to get 5 in a row and the playing board is either a 15x15 or a 19x19 GO board. For the purposes of this game, the board size is adjustable from 6x6 to 19x19 and the number needed to win is adjustable from 3 to 6. In a real Gomoku game, you have to have EXACTLY 5 in a row; 6 or more do not count. But for this game, 5 (or whatever) or more win. The game demonstrates how to set up an evaluation function, how to set up a minimax search and how to prune using the alpha-beta algorithm. The game looks ahead a certain number of plys (adjustable from 1 to 6) and picks the best move it can. Since a 15x15 board with 4 plys has up to 2.4 BILLION combinations, pruning the tree becomes important. The game does this by using the alpha beta algorithm. The algorithm works by comparing the value against a limit. If the limit is exceeded, the algorithm abandons the branch. An example in chess would be something like: move (A) has been examined and will, at worst, capture a pawn. We now examine move (B). If we find that in one variation, move (B) will lose a pawn, we abandon the branch, even if at best, move (B) could capture a queen. The reason is because we assume our opponent will do the smartest possible move so we are going to lose a pawn, which is worse than gaining a pawn with move (A). I wrote this in a bit of a hurry (I intend to use it as example source code in my resume) so I haven't finished commenting it yet. So please ask if you have any questions. Oh yeah, please vote for me if you like it. Also, if you beat the game on 4 ply or higher, let me know.

Languages
Top Categories
Global Discovery