artificial-intelligence

OCR Playing Cards [closed]

 ̄綄美尐妖づ 提交于 2019-12-03 12:15:40
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 8 months ago . I decided to do a project for fun where I want to take as input the image of a playing card and return its rank and suit. I figure that I only need look at the upper-left corner, since that has all the information. It should be robust - if I have a large image of an Ace of

Tic Tac Toe and Minimax - Creating an imperfect AI on a microcontroller

…衆ロ難τιáo~ 提交于 2019-12-03 11:56:08
I have created a Tic-Tac-Toe game on a microcontroller, including a perfect AI (perfect meaning that it doesn't lose). I did not use a minimax algorithm for that, just a little state machine with all possible and optimal moves. My problem now is that I wanted to implement different difficulties (Easy, Medium and Hard). The AI so far would be the hard one. So I've thought about how to do this the best way and ended up wanting to use the minimax algorithm but in a way that it calculates all the scores for all game positions so that I can also sometimes pick the second best score instead of the

How to Find Documents That are in the same Cluster with KMeans

谁都会走 提交于 2019-12-03 11:42:32
问题 I have clustered various articles together with the Scikit-learn framework. Below are the top 15 words in each cluster: Cluster 0: whales islands seaworld hurricane whale odile storm tropical kph mph pacific mexico orca coast cabos Cluster 1: ebola outbreak vaccine africa usaid foundation virus cdc gates disease health vaccines experimental centers obama Cluster 2: jones bobo sanford children carolina mississippi alabama lexington bodies crumpton mccarty county hyder tennessee sheriff Cluster

Hill climbing algorithm simple example

社会主义新天地 提交于 2019-12-03 11:32:58
问题 I am a little confused with Hill Climbing algorithm. I want to "run" the algorithm until i found the first solution in that tree ( "a" is initial and h and k are final states ) and it says that the numbers near the states are the heuristic values. Here's the tree: My question : i am trying to run hill climbing on the tree, so ok we start a-> f-> g and then what ??finish(without result) , but I read that hill climbing can't go back and make a new choice(example j or e) ? Is this right ? If i

Pong: How does the paddle know where the ball will hit?

一个人想着一个人 提交于 2019-12-03 10:50:00
问题 After implementing Pacman and Snake I'm implementing the next very very classic game: Pong. The implementation is really simple, but I just have one little problem remaining. When one of the paddle (I'm not sure if it is called paddle) is controlled by the computer, I have trouble to position it at the correct position. The ball has a current position, a speed (which for now is constant) and a direction angle. So I could calculate the position where it will hit the side of the computer

“synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.” problem in TensorFlow

久未见 提交于 2019-12-03 10:45:29
问题 I installed TensorFlow 1.10.1 but when I tried to import TensorFlow it said that I need TensorFlow version 1.10.0. Thus, I installed it and now I get the following warnings: >>> import tensorflow C:\Users\PC\Anaconda3\envs\tut\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) C

Intelligent agents “tutorial” [closed]

爱⌒轻易说出口 提交于 2019-12-03 10:17:08
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I've recently come across Intelligent Agents by reading this book : link text I'm interested in finding a good book for beginners, so I can start to implement such a system. I've also tried reading "Multiagent Systems : A modern approach to distributed artificial intelligence" (can't find it on amazon) but it's

Searching Natural Language Sentence Structure

淺唱寂寞╮ 提交于 2019-12-03 10:10:14
问题 What's the best way to store and search a database of natural language sentence structure trees? Using OpenNLP's English Treebank Parser, I can get fairly reliable sentence structure parsings for arbitrary sentences. What I'd like to do is create a tool that can extract all the doc strings from my source code, generate these trees for all sentences in the doc strings, store these trees and their associated function name in a database, and then allow a user to search the database using natural

Algorithm to find related words in a text

こ雲淡風輕ζ 提交于 2019-12-03 10:03:59
问题 I would like to have a word (e.g. "Apple) and process a text (or maybe more). I'd like to come up with related terms. For example: process a document for Apple and find that iPod, iPhone, Mac are terms related to "Apple". Any idea on how to solve this? 回答1: As a starting point: your question relates to text mining. There are two ways: a statistical approach, and one form natural language processing (nlp). I do not know much about nlp, but can say something about the statistical approach: You

Python Rule Based Engine [closed]

ぐ巨炮叔叔 提交于 2019-12-03 10:00:47
Closed . This question needs to be more focused. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it focuses on one problem only by editing this post . I am looking to design a system that will essentially need to make decisions based on input. The input will be a person. class Person: def __init__(self, name, age, sex, weight, height, nationality): self.name = name self.age = age self.sex = sex self.weight = weight self.height = height self.nationality = nationality We want to assign each person to a school class based on certain rules.