我有兴趣用Java构建Texas Hold'Em AI引擎.这是一个长期项目,我计划投资至少两年.我还在上大学,还没有建立任何雄心勃勃的东西,并希望解决一个长期存在我兴趣的问题.我是人工智能领域的新手.从我在大学的数据结构课程中,我知道基本的构建模块,如BFS和DFS,回溯,DP,树,图等.我正在学习正则表达式,为SCJP和SCJD学习,我将很快采取(密集) )统计课程.
问题:
- 我从哪里开始?我应该选哪些书?玩扑克游戏程序的人工智能是什么样的?我可以从哪个开源项目中获取页面?Java中有哪些优秀的AI资源?我也有兴趣学习Lisp,Jatha好吗?
假设我指定一个矩阵A状
A = [1 2 3; 4 5 6; 7 8 9]
Run Code Online (Sandbox Code Playgroud)
如何查询A (不使用length(A))找出它有3列?
每次我尝试打开wavefront obj文件时,都会收到不支持的文件类型错误.为什么是这样?.obj不是3D标准吗?
我想限制a的最大大小,HashMap以便对我正在实现的各种散列算法采用指标.我查看了一个HashMap重载构造函数中的loadfactor .
HashMap(int initialCapacity, float loadFactor)
Run Code Online (Sandbox Code Playgroud)
我尝试在构造函数中将loadFactor设置为0.0f(意味着我不希望HashMap的大小增长为EVER),但javac调用此无效:
Exception in thread "main" java.lang.IllegalArgumentException: Illegal load factor: 0.0
at java.util.HashMap.<init>(HashMap.java:177)
at hashtables.CustomHash.<init>(Main.java:20)
at hashtables.Main.main(Main.java:70) Java Result: 1
Run Code Online (Sandbox Code Playgroud)
有没有另一种限制大小的方法,HashMap所以它不会增长?
我想从标准输入中读取整行,包括两个单词之间的空格.
当使用get on gcc时,我收到以下消息:
send.c:(.text+0x2a): warning: the `gets' function is dangerous and should not be used.
Run Code Online (Sandbox Code Playgroud)
什么是更好的选择?
我正在使用此声明移植标头:
struct tMaterialInfo {
char strName[255]; // the texture name
char strFile [255]; // the texture
BYTE color [3]; // the color of the object
};
Run Code Online (Sandbox Code Playgroud)
标题包含以下内容:
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <fstream>
#include <vector>
#include <gl\gl.h> // Header File For The OpenGL32 Library
#include<gl\glu.h>// Header File For The GLu32 Library
#include <gl\glaux.h>
Run Code Online (Sandbox Code Playgroud)
BYTE来自哪里?
我不确定使用非常常见的共享列值(如Country)作为复合主键的分区键还是相当独特的列值(如Last_Name),在性能方面是否更好.
看看Cassandra 1.2关于索引的文档,我得到了这个:
" 何时使用索引:Cassandra的内置索引最适合包含索引值的许多行的表.特定列中存在的唯一值越多,平均而言,查询和查询的开销就越大.维护索引.例如,假设您有一个拥有十亿用户的用户表,并希望按照他们所居住的状态查找用户.许多用户将共享相同的状态列值(例如CA,NY,TX等) .).这将是一个指数的良好候选人. "
" 何时不使用索引:不要使用索引来查询少量结果的大量记录.例如,如果在具有许多不同值的列上创建索引,则字段之间的查询将招致许多寻求极少数的结果.在该表中有一个十亿用户,查找通过他们的电子邮件地址(也就是通常是唯一针对每个用户的值)的用户,而不是由他们的状态,很可能是非常低效的.它可能会更有效地手动维护表作为索引的一种形式,而不是使用Cassandra内置索引.对于包含唯一数据的列,为方便起见,使用索引有时性能良好,只要查询量到具有索引列的表是适度的而不是在恒定负载下."
查看CQL的SELECT for 中的示例
" 查询复合主键和排序结果 ",我看到类似UUID的东西被用作分区键... 这表明最好使用一些相当独特的东西?

cassandra database-partitioning composite-primary-key database-indexes
我只是在了解它们,并发现它们已被弃用而令人沮丧.我应该继续投资学习吗?我会学到一些对当前模型有用的东西吗?
我有一个A像矩阵
1 2 3 4 5
6 7 8 9 0
Run Code Online (Sandbox Code Playgroud)
我想用一排来扩展它
1 1 1 1 1
1 2 3 4 5
6 7 8 9 0
Run Code Online (Sandbox Code Playgroud)
我创建了一行
col_size = size(A, 2);
ones_row = ones(1, col_size);
Run Code Online (Sandbox Code Playgroud)
如何将我添加ones_row到矩阵中?
调用vector时我得到这个编译器错误size().为什么?
#include <vector>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <cassert>
using namespace std;
class Vertex {
float firstValue;
float secondValue;
float thirdValue;
Vertex (float first, float second, float third){
firstValue=first;
secondValue=second;
thirdValue=third;
}
};
int main()
{
cout<<"This program loads a 3D .off object. \nEnter the name of the file that describes it "<<endl;
string inputFileName;
getline(cin, inputFileName);
ifstream inputFileStream;
inputFileStream.open(inputFileName.data());
assert (inputFileStream.is_open());
string actualLine;
for(;;){
inputFileStream>>actualLine;
istringstream actualLineStream(actualLine);
std::vector<float> results( std::istream_iterator<int>(actualLineStream)
, std::istream_iterator<int>() ); …Run Code Online (Sandbox Code Playgroud)