artificial-intelligence

Intelligent pattern matching in string

拈花ヽ惹草 提交于 2019-12-05 11:50:42
Let's say I have filenames which are formatted differently. I want to be able to extract certain aspects from said filename like a human would; pattern recognition. Obviously I can bruteforce myself through with regular expressions but that's not what I'm after. Let's say I have these 4 strings: [MAS] Hayate no Gotoku!! 20 [BD 720p] [21D138F8].mkv [Leopard-Raws] Akatsuki no Yona - 05 RAW (MX 1280x720 x264 AAC).mp4 [BLAST] Wolf Girl and Black Prince - 05 [720p] [C1252A5E].mkv [sage]_Mobile_Suit_Gundam_AGE_-_36_[720p][10bit][45C9E0D0].mkv As you can see all these filenames have certain pattern

How to implement efficient Alpha-Beta pruning Game Search Tree?

空扰寡人 提交于 2019-12-05 10:39:37
问题 I'm trying to learn about artificial intelligence and how to implement it in a program. The easiest place to start is probably with simple games (in this case Tic-Tac-Toe) and Game Search Trees (recursive calls; not an actual data structure). I found this very useful video on a lecture about the topic. The problem I'm having is that the first call to the algorithm is taking an extremely long amount of time (about 15 seconds) to execute. I've placed debugging log outputs throughout the code

Neural network is not giving the expected output after training in Python

走远了吗. 提交于 2019-12-05 09:51:34
My neural network is not giving the expected output after training in Python. Is there any error in the code? Is there any way to reduce the mean squared error (MSE)? I tried to train (Run the program) the network repeatedly but it is not learning, instead it is giving the same MSE and output. Here is the Data I used: https://drive.google.com/open?id=1GLm87-5E_6YhUIPZ_CtQLV9F9wcGaTj2 Here is my code: #load and evaluate a saved model from numpy import loadtxt from tensorflow.keras.models import load_model # load model model = load_model('ANNnew.h5') # summarize model. model.summary() #Model

Monte Carlo Tree Search or other algorithms for a stochastic card game?

你。 提交于 2019-12-05 09:35:47
I am currently working on an implementation of a 2 player trick-and-draw card game, similar to 66 or Schnapsen. Basically you need to gather points by winning tricks and while there are cards in the pack, both players draw a card after each round. I am at the point of programming a good AI for the game that does not cheat, but really calculates the best moves by using only the information it has at the given game state. I am stuck deciding which algorithm or logic would be the best to use. I decided against algorithms like Alpha-Beta pruning because there are too much hidden information

Encog - How to load training data for Neural Network

走远了吗. 提交于 2019-12-05 06:43:12
The NeuralDataSet objects that I've seen in action haven't been anything but XOR which is just two small data arrays... I haven't been able to figure out anything from the documentation on MLDataSet . It seems like everything must be loaded at once. However, I would like to loop through training data until I reach EOF and then count that as 1 epoch.. However, everything I've seen all the data must be loaded into 1 2D array from the beginning. How can I get around this? I've read this question, and the answers didn't really help me . And besides that, I haven't found a similar question asked on

Neural network using MATLAB

亡梦爱人 提交于 2019-12-05 06:10:01
问题 I have a training set that has input and outputs in this way: Input: 0.832 64.643 0.818 78.843 1.776 45.049 0.597 88.302 1.412 63.458 1.468 49.535 1.985 33.387 2.073 30.279 1.431 55.231 1.116 68.521 1.617 44.362 2.159 66.512 Output: 0 0 1 0 0 1 0 1 0 0 0 1 0 0 1 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 0 1 0 I need to implement one linear layer neural network that can represent the data set best in MATLAB. What would be the algorithm to do it in MATLAB? The target output is

How many images to use for positive and negative samples when Haar training?

放肆的年华 提交于 2019-12-05 05:57:34
I have read a fair amount about Haar training and I'm not clear on how many images one should use for the positive and negative sample sets. I see it recommended to use many images, some people recommend thousands. I'm also unclear of whether the number of positive and negative sample images should be the same? Abid Rahman K Here is the best tutorial on Haar training. Have you tried this? http://note.sonots.com/SciSoftware/haartraining.html It says they used 5000 for positive and 3000 for negative. This link says 3000 for positive and 5000 for negative. Anyway, higher number of images improves

Best way to compare meaning of text documents?

假如想象 提交于 2019-12-05 05:10:59
问题 I'm trying to find the best way to compare two text documents using AI and machine learning methods. I've used the TF-IDF-Cosine Similarity and other similarity measures, but this compares the documents at a word (or n-gram) level. I'm looking for a method that allows me to compare the meaning of the documents. What is the best way to do that? 回答1: You should start reading about word2vec model. use gensim, get the pretrained model of google. For vectoring a document, use Doc2vec() function.

How can I prevent my program from getting stuck at a local maximum (Feed forward artificial neural network and genetic algorithm)

南笙酒味 提交于 2019-12-05 04:10:32
问题 I'm working on a feed forward artificial neural network (ffann) that will take input in form of a simple calculation and return the result (acting as a pocket calculator). The outcome wont be exact. The artificial network is trained using genetic algorithm on the weights. Currently my program gets stuck at a local maximum at: 5-6% correct answers, with 1% error margin 30 % correct answers, with 10% error margin 40 % correct answers, with 20% error margin 45 % correct answers, with 30% error

algorithm to detect time, date and place from invitation text

眉间皱痕 提交于 2019-12-05 02:33:07
问题 I am researching some Natural Language Processing algorithms to read a piece of text, and if the text seems to be trying to suggest a meeting request, it sets up that meeting for you automatically. For example, if an email text reads: Let's meet tomorrow someplace in Downtown at 7pm ". The algorithm should be able to detect the Time, date and place of the event. Does someone know of some already existing NLP algorithms that I could use for this purpose? I have been researching some NLP