artificial-intelligence

Artificial Intelligence in Tic-Tac-Toe using C#

青春壹個敷衍的年華 提交于 2019-11-27 14:45:52
问题 I have made a Tic-Tac-Toe game for 2 players. Now, I want to give the game Artificial Intelligence. So that game can be played between 1 player and computer . Please, help How do I start? 回答1: With Tic Tac Toe it's not so much an AI but a lookup table: For each possible board layout, find the best spot. XKCD has such a lookup table. Basically each Board Layout gets a unique ID and the address of the field where to set the next mark. Wikipedia has that table in another format. The table works

Detecting circles and shots from paper target

末鹿安然 提交于 2019-11-27 14:16:05
问题 I'm making a small project where i have to detect points scored from a given image of paper target. Something similar to TargetScan app for iPhone. I'm using openCV for processing image and basically i have two parts for this, one is to detect circles from a target(which works pretty good with Hough Circle Transform) and the second part is to detect shots. I need some ideas how to detect those shots from a given image. Here is an example image with circle detection ON (green line for circles

How to reuse saved classifier created from explorer(in weka) in eclipse java

别说谁变了你拦得住时间么 提交于 2019-11-27 13:18:11
问题 I have created a classifier in WEKA, i saved it on my hard-disk, now I want to use that classifier in eclipse using weka api. How can i do this? please guide me to this... thank you 回答1: Here is an example of loading a model to predict the value of instances. The example model is a J48 decision tree created and saved in the Weka Explorer. It was built from the nominal weather data provided with Weka. It is called "tree.model". //load model String rootPath="/some/where/"; Classifier cls =

A* heuristic, overestimation/underestimation?

一曲冷凌霜 提交于 2019-11-27 11:50:29
I am confused about the terms overestimation/underestimation. I perfectly get how A* algorithm works, but i am unsure of the effects of having a heuristic that overestimate or underestimate. Is overestimation when you take the square of the direct birdview-line? And why would it make the algorithm incorrect? The same heuristic is used for all nodes. Is underestimation when you take the squareroot of the direct birdview-line? And why is the algorithm still correct? I can't find an article which explains it nice and clear so I hope someone here has a good description. You're overestimating when

Implementing and ploting a perceptron in MATLAB

依然范特西╮ 提交于 2019-11-27 11:00:45
问题 I´m reviewing a code from Toronto perceptron MATLAB code The code is function [w] = perceptron(X,Y,w_init) w = w_init; for iteration = 1 : 100 %<- in practice, use some stopping criterion! for ii = 1 : size(X,2) %cycle through training set if sign(w'*X(:,ii)) ~= Y(ii) %wrong decision? w = w + X(:,ii) * Y(ii); %then add (or subtract) this point to w end end sum(sign(w'*X)~=Y)/size(X,2) %show misclassification rate end So I was reading how to apply this function to data matrix X, and target Y,

Natural Language Processing in Ruby [closed]

六眼飞鱼酱① 提交于 2019-11-27 10:07:15
I'm looking to do some sentence analysis (mostly for twitter apps) and infer some general characteristics. Are there any good natural language processing libraries for this sort of thing in Ruby? Similar to Is there a good natural language processing library but for Ruby. I'd prefer something very general, but any leads are appreciated! There are some things at Ruby Linguistics and some links therefrom, though it doesn't seem anywhere close to what NLTK is for Python, yet. Three excellent and mature NLP packages are Stanford Core NLP , Open NLP and LingPipe . There are Ruby bindings to the

What is the difference between graph search and tree search?

ⅰ亾dé卋堺 提交于 2019-11-27 10:02:05
What is the difference between graph search and tree search versions regarding DFS, A* searches in artificial intelligence ? Judging from the existing answers, there seems to be a lot of confusion about this concept. The Problem Is Always a Graph The distinction between tree search and graph search is not rooted in the fact whether the problem graph is a tree or a general graph. It is always assumed you're dealing with a general graph. The distinction lies in the traversal pattern that is used to search through the graph, which can be graph-shaped or tree-shaped. If you're dealing with a tree

What is the difference between supervised learning and unsupervised learning?

佐手、 提交于 2019-11-27 09:56:39
In terms of artificial intelligence and machine learning, what is the difference between supervised and unsupervised learning? Can you provide a basic, easy explanation with an example? Davide Since you ask this very basic question, it looks like it's worth specifying what Machine Learning itself is. Machine Learning is a class of algorithms which is data-driven, i.e. unlike "normal" algorithms it is the data that "tells" what the "good answer" is. Example: a hypothetical non-machine learning algorithm for face detection in images would try to define what a face is (round skin-like-colored

How to optimally solve the flood fill puzzle?

落爺英雄遲暮 提交于 2019-11-27 09:32:37
问题 I like playing the puzzle game Flood-It, which can be played online at: https://www.lemoda.net/javascript/flood-it/game.html It's also available as an iGoogle gadget. The aim is to fill the whole board with the least number of successive flood-fills. I'm trying to write a program which can solve this puzzle optimally. What's the best way to approach this problem? Ideally I want to use the A* algorithm, but I have no idea what should be the function estimating the number of steps left. I did

Neural Network example in .NET [closed]

萝らか妹 提交于 2019-11-27 09:06:23
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Any good tutorial with source that will demonstrate how to develop neural network (step bay step for dummies ;-)) 回答1: Here is good