artificial-intelligence

What are good examples of genetic algorithms/genetic programming solutions? [closed]

烂漫一生 提交于 2019-11-26 10:04:09
问题 Genetic algorithms (GA) and genetic programming (GP) are interesting areas of research. I\'d like to know about specific problems you have solved using GA/GP and what libraries/frameworks you used if you didn\'t roll your own. Questions: What problems have you used GA/GP to solve? What libraries/frameworks did you use? I\'m looking for first-hand experiences, so please do not answer unless you have that. 回答1: Not homework. My first job as a professional programmer (1995) was writing a genetic

support vector machines in matlab

独自空忆成欢 提交于 2019-11-26 09:34:12
问题 Could you give an example of classification of 4 classes using Support Vector Machines (SVM) in matlab something like: atribute_1 atribute_2 atribute_3 atribute_4 class 1 2 3 4 0 1 2 3 5 0 0 2 6 4 1 0 3 3 8 1 7 2 6 4 2 9 1 7 10 3 回答1: MATLAB does not support multiclass SVM at the moment. You could use svmtrain (2-classes) to achieve this, but it would be much easier to use a standard SVM package. I have used LIBSVM and can confirm that it's very easy to use. %%# Your data D = [ 1 2 3 4 0 1 2

Unsupervised clustering with unknown number of clusters

て烟熏妆下的殇ゞ 提交于 2019-11-26 08:46:26
问题 I have a large set of vectors in 3 dimensions. I need to cluster these based on Euclidean distance such that all the vectors in any particular cluster have a Euclidean distance between each other less than a threshold \"T\". I do not know how many clusters exist. At the end, there may be individual vectors existing that are not part of any cluster because its euclidean distance is not less than \"T\" with any of the vectors in the space. What existing algorithms / approach should be used here

Epoch vs Iteration when training neural networks

寵の児 提交于 2019-11-26 08:38:51
问题 What is the difference between epoch and iteration when training a multi-layer perceptron? 回答1: In the neural network terminology: one epoch = one forward pass and one backward pass of all the training examples batch size = the number of training examples in one forward/backward pass. The higher the batch size, the more memory space you'll need. number of iterations = number of passes, each pass using [batch size] number of examples. To be clear, one pass = one forward pass + one backward

How can I split a text into sentences using the Stanford parser?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 07:28:36
问题 How can I split a text or paragraph into sentences using Stanford parser? Is there any method that can extract sentences, such as getSentencesFromString() as it\'s provided for Ruby? 回答1: You can check the DocumentPreprocessor class. Below is a short snippet. I think there may be other ways to do what you want. String paragraph = "My 1st sentence. “Does it work for questions?” My third sentence."; Reader reader = new StringReader(paragraph); DocumentPreprocessor dp = new DocumentPreprocessor

How does Dijkstra's Algorithm and A-Star compare?

萝らか妹 提交于 2019-11-26 06:11:42
问题 I was looking at what the guys in the Mario AI Competition have been doing and some of them have built some pretty neat Mario bots utilizing the A* (A-Star) Pathing Algorithm. (Video of Mario A* Bot In Action) My question is, how does A-Star compare with Dijkstra? Looking over them, they seem similar. Why would someone use one over the other? Especially in the context of pathing in games? 回答1: Dijkstra is a special case for A* (when the heuristics is zero). 回答2: Dijkstra: It has one cost

What's is the difference between train, validation and test set, in neural networks?

那年仲夏 提交于 2019-11-26 05:57:02
问题 I\'m using this library to implement a learning agent. I have generated the training cases, but I don\'t know for sure what the validation and test sets are. The teacher says: 70% should be train cases, 10% will be test cases and the rest 20% should be validation cases. edit I have this code for training, but I have no idea when to stop training. def train(self, train, validation, N=0.3, M=0.1): # N: learning rate # M: momentum factor accuracy = list() while(True): error = 0.0 for p in train:

Store orientation to an array - and compare

让人想犯罪 __ 提交于 2019-11-26 05:28:13
问题 I want to achieve the following: I want the user to be able to \"record\" the movement of the iPhone using the gyroscope. And after that, the user should be able to replicate the same movement. I extract the pitch, roll and yaw using: [self.motionManager startDeviceMotionUpdatesToQueue:[NSOperationQueue currentQueue] withHandler: ^(CMDeviceMotion *motion, NSError *error) { CMAttitude *attitude = motion.attitude; NSLog(@\"pitch: %f, roll: %f, yaw: %f]\", attitude.pitch, attitude.roll, attitude

Clarification on a Neural Net that plays Snake

家住魔仙堡 提交于 2019-11-26 05:21:49
I'm new to neural networks/machine learning/genetic algorithms, and for my first implementation I am writing a network that learns to play snake ( An example in case you haven't played it before ) I have a few questions that I don't fully understand: Before my questions I just want to make sure I understand the general idea correctly. There is a population of snakes, each with randomly generated DNA. The DNA is the weights used in the neural network. Each time the snake moves, it uses the neural net to decide where to go (using a bias). When the population dies, select some parents (maybe

What algorithm for a tic-tac-toe game can I use to determine the “best move” for the AI?

为君一笑 提交于 2019-11-26 04:36:49
问题 In a tic-tac-toe implementation I guess that the challenging part is to determine the best move to be played by the machine. What are the algorithms that can pursued? I\'m looking into implementations from simple to complex. How would I go about tackling this part of the problem? 回答1: The strategy from Wikipedia for playing a perfect game (win or tie every time) seems like straightforward pseudo-code: Quote from Wikipedia (Tic Tac Toe#Strategy) A player can play a perfect game of Tic-tac-toe