摘要: 先上一张alpha beta原理图,一看就懂 代码有点长,主要是因为算评估值得时候用的是穷举。 玩家是1,电脑是2,可以选择难度以及先手 运行截图: 阅读全文
posted @ 2017-05-02 06:25 熊阳 阅读(1293) 评论(0) 推荐(0) 编辑
摘要: BluePrint: 创建Widget蓝图,编辑控件,绑定事件,根据不同情况可能需要getPlayerController->setInputMode,在观看蓝图或者gameMode蓝图内加入该widget。 可以用Promote to Variable产生一个随时可以使用的变量,在绑定控件时就可以 阅读全文
posted @ 2017-02-13 11:37 熊阳 阅读(4596) 评论(0) 推荐(0) 编辑
摘要: 1. app store下载xcode 2. OpenCV 官网下载OpenCV for linux/mac 3.安装homebrew 4.命令行使用brew install cmake 安装cmake 5.cd 到opencv解压后的文件夹,在命令行依次执行以下命令: mkdir build cd 阅读全文
posted @ 2016-09-27 04:53 熊阳 阅读(7481) 评论(0) 推荐(0) 编辑
摘要: 1.简单的算数操作和向量运算 命令行启动 R,退出 q(). 可以在退出时保存项目进度,同目录下启动R时可以恢复进度. 获取函数帮助:help(solve) 或者 ?solve ,help.start() 启动html帮助 对于使用某个命令的例子,可以用example(topic)查看 R 大小写敏 阅读全文
posted @ 2016-09-23 05:33 熊阳 阅读(1066) 评论(0) 推荐(0) 编辑
摘要: 需要包括库文件 #include <fstream> (1) ofstream:写操作,输出文件类; (2) ifstream:读操作,输入文件类; (3) fstream:可同时读写的文件类。 一般使用ofstream 和ifstream更加清楚明了 ifstream fin("input.txt 阅读全文
posted @ 2016-09-18 22:53 熊阳 阅读(540) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, every element appears twice except for one. Find that single one. 这道题看似很简单,但是需要线性时间和不消耗额外空间,这里需要用到c++的“亦或”操作,因为 相同数数字 ^ 操作 阅读全文
posted @ 2016-09-08 22:13 熊阳 阅读(126) 评论(0) 推荐(0) 编辑
摘要: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl 阅读全文
posted @ 2016-09-06 22:49 熊阳 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 把我难哭了 T T 目前还在想第二种方法。。。。 耗时5小时总算想出来了。。。。 前面一种方法用的递归,下面的方法用的是迭代,要比递归快的多。 不容易啊! 阅读全文
posted @ 2016-03-25 09:08 熊阳 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 使用的时候需要导入sstream头文件 阅读全文
posted @ 2016-03-24 07:25 熊阳 阅读(567) 评论(0) 推荐(0) 编辑
摘要: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. 阅读全文
posted @ 2016-03-24 07:01 熊阳 阅读(587) 评论(0) 推荐(0) 编辑