artificial-intelligence

Algorithm to understand meaning [closed]

混江龙づ霸主 提交于 2019-12-03 09:47:37
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . I want to know if is there any specific algorithm that can be followed to understand the meaning of a word/sentence/paragraph. Basically, I want to write a program that will take text/paragraph as input and try

How to identify ideas and concepts in a given text

柔情痞子 提交于 2019-12-03 09:41:31
问题 I'm working on a project at the moment where it would be really useful to be able to detect when a certain topic/idea is mentioned in a body of text. For instance, if the text contained: Maybe if you tell me a little more about who Mr Jones is, that would help. It would also be useful if I could have a description of his appearance, or even better a photograph? It'd be great to be able to detect that the person has asked for a photograph of Mr Jones. I could take a really naïve approach and

What algorithm would you use to solve a very large tic-tac-toe game?

陌路散爱 提交于 2019-12-03 09:39:27
A small (3x3, 4x4) tic-tac-toe can be easily solved by considering all the cases. But for example, you have a 30x30 tic-tac-toe. What algorithm would you use to decide the next best move in that case? Minimax + alpha-beta pruning is one way that I know. Is there some other way that is more efficient/not more efficient but cooler? I know it would not be a very interesting game to play. I said 30x30 just to ask what I wanted to i.e. which algorithms work best at these sort of games where the number of cases to consider for a perfect solution is very very high and thus not feasible. I don't think

Why is the complexity of A* exponential in memory?

旧街凉风 提交于 2019-12-03 09:36:55
问题 Wikipedia says on A* complexity the following (link here): More problematic than its time complexity is A*’s memory usage. In the worst case, it must also remember an exponential number of nodes. I fail to see this is correct because: Say we explore node A, with successors B, C, and D. Then we add B, C, and D to the list of open nodes, each accompanied by a reference to A, and we move A from the open nodes to the closed nodes. If at some time we find another path to B (say, via Q), that is

Backprop implementation issue

蹲街弑〆低调 提交于 2019-12-03 09:15:10
What I am supposed to do. I have an black and white image (100x100px): I am supposed to train a backpropagation neural network with this image. The inputs are x, y coordinates of the image (from 0 to 99) and output is either 1 (white color) or 0 (black color). Once the network has learned, I would like it to reproduce the image based on its weights and get the closest possible image to the original. Here is my backprop implementation: import os import math import Image import random from random import sample #------------------------------ class definitions class Weight: def __init__(self,

extrapolation with recurrent neural network

*爱你&永不变心* 提交于 2019-12-03 08:51:57
问题 I Wrote a simple recurrent neural network (7 neurons, each one is initially connected to all the neurons) and trained it using a genetic algorithm to learn "complicated", non-linear functions like 1/(1+x^2). As the training set, I used 20 values within the range [-5,5] (I tried to use more than 20 but the results were not changed dramatically). The network can learn this range pretty well, and when given examples of other points within this range, it can predict the value of the function.

15 Puzzle Heuristic

北城以北 提交于 2019-12-03 08:48:18
The 15 Puzzle is a classical problem for modelling algorithms involving heuristics. Commonly used heuristics for this problem include counting the number of misplaced tiles and finding the sum of the Manhattan distances between each block and its position in the goal configuration. Note that both are admissible, i.e., they never overestimate the number of moves left, which ensures optimality for certain search algorithms such as A*. What Heuristic do you think is proper, A* seems to work nice, do you have an example, maybe in c or java ? Margus Heuristic My heuristic of choice is to find if

Help--100% accuracy with LibSVM?

时间秒杀一切 提交于 2019-12-03 08:19:31
问题 Nominally a good problem to have, but I'm pretty sure it is because something funny is going on... As context, I'm working on a problem in the facial expression/recognition space, so getting 100% accuracy seems incredibly implausible (not that it would be plausible in most applications...). I'm guessing there is either some consistent bias in the data set that it making it overly easy for an SVM to pull out the answer, =or=, more likely, I've done something wrong on the SVM side. I'm looking

Alpha beta search time complexity

只愿长相守 提交于 2019-12-03 07:53:17
I understand the basics of minimax and alpha-beta pruning. In all the literature, they talk about the time complexity for the best case is O(b^(d/2)) where b = branching factor and d = depth of the tree, and the base case is when all the preferred nodes are expanded first. In my example of the "best case", I have a binary tree of 4 levels, so out of the 16 terminal nodes, I need to expand at most 7 nodes. How does this relate to O(b^(d/2))? I don't understand how they come to O(b^(d/2)). Please, can someone explain it to me? Thans a lot! O(b^(d/2)) correspond to the best case time complexity

Finding the best move using MinMax with Alpha-Beta pruning

若如初见. 提交于 2019-12-03 07:47:12
I'm working on an AI for a game and I want to use the MinMax algorithm with the Alpha-Beta pruning . I have a rough idea on how it works but I'm still not able to write the code from scratch, so I've spend the last two days looking for some kind of pseudocode online. My problem is that every pseudocode I've found online seems to be based on finding the value for the best move while I need to return the best move itself and not a number. My current code is based on this pseudocode ( source ) minimax(level, player, alpha, beta){ // player may be "computer" or "opponent" if (gameover || level ==