今天因为工作需要,察看了我原来备份的一些文件。
结果我翻出来了好多已经被我遗忘了的东西,都拿来跟大家分享吧,也作为一个纪念。
先分享一个 LabVIEW 下黑白棋的程序。这不是我说过的使用遗传算法的那个程序。
这是我刚开始学习 LabVIEW 时编写的程序。那时还是1999年,使用的是LabVIEW 5.1。
程序里基本只有界面,没有实现什么算法。
程序在LabVIEW 5.1上开发之后,我再也没有再维护过。我今天在LabVIEW 8.1 上试着打开它,发现以前所使用的一些库VI已经找不到了,不过只影响到了Othello server.vi。其他VI还可以正常运行。
解开zip包:
Othello.vi 是在本机两人对战的主VI
Othello auto.vi 或 Othello super.vi 是人机对战的主VI
Othello server.vi 是在局域网两人对战的服务端VI
Othello client.vi 是在局域网两人对战的客户端VI
单片机源程序如下:
- // Othello.cpp : Defines the entry point for the console application.
- //
- #include "stdio.h"
- #include "stdlib.h"
- #include "CheckStatus.h"
- #include "TurnOver.h"
- #include "AutoPutOneChess.h"
- int GetNewChessPosition(int thePositionArrary[8][8], int chessColor,
- int step, int *autoRow, int *autoColumn)
- { rand();
- if ((step)<54)
- Auto_Put_Chess(thePositionArrary, chessColor, 7, autoRow, autoColumn);
- else
- Auto_Put_Chess(thePositionArrary, chessColor, 64-(step), autoRow, autoColumn);
- return(0);
- }
复制代码
所有资料51hei提供下载:
黑白棋程序.zip
(518.59 KB, 下载次数: 11)
|