artificial-intelligence

How to implement ordered crossover

ⅰ亾dé卋堺 提交于 2019-12-07 09:12:01
问题 So I have two parents ABCDE EDCBA can I just select a subset from both: From parent one: ACD From parent two: EDC Then I copy parent one into offspring one but copy the selected subset with parent twos order so: Offspring one: DBCAE Offspring two: CDEBA 回答1: To answer the title question: http://www.eecs.tufts.edu/~jfinke02/jmona/xref/jmona/example/tsp/crossover/OrderedCrossoverFunction.html: 1 /** 2 * OrderedCrossoverFunction.java 3 * 4 * Copyright 2009, 2010 Jeffrey Finkelstein 5 * 6 * This

Can anyone suggest good algorithms for CBIR?

醉酒当歌 提交于 2019-12-07 08:40:53
问题 Project: Content Based Image Retrieval - Semi-supervised (manual tagging is done on images while training) Description I have 1000000 images in the database. The training is manual (supervised) - title and tags are provided for each image. Example: coke.jpg Title : Coke Tags : Coke, Can Using the images and tags, I have to train the system. After training, when I give a new image (already in database/ completely new) the system should output the possible tags the image may belong to and

Crossover different length genotypes

雨燕双飞 提交于 2019-12-07 08:38:53
问题 E.g. I have two random representatives 1 6 8 9 0 3 4 7 5 and 3 6 5 7 8 5 What are the ways to crossover them? Add some empty numbers (or operations or sth) on the end of every genotype so they will have the same size? 3 6 5 7 8 5 -1 -1 -1 where -1 means nothing? Or copy few number from first genotype and some from second? What is the way you use? 回答1: If you already have variable length chromosomes, then it shouldnt matter how you do it, you just need to select a crossover point for each of

Gaussian-RBM fails on a trivial example

女生的网名这么多〃 提交于 2019-12-07 04:51:14
问题 I want to have a nitty-gritty understanding of Restricted Boltzman Machines with continuous input variables. I am trying to devise the most trivial possible example, so that the behavior could be easily tracked. So, here it is. The input data is two-dimensional. Each data point is drawn from one of two symmetrical normal distributions (sigma = 0.03), whose centers are well spaced (15 times sigma). The RBM has two-dimensional hidden layer. I expected to obtain an RBM that would generate two

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

你说的曾经没有我的故事 提交于 2019-12-07 03:09:52
问题 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

Can someone explain about detectMultiScale in openCV

人走茶凉 提交于 2019-12-06 16:50:32
I've been trying objectDetection in openCV.. Followed a few steps.. Resizing it to 64x64 resolution Changing it to gray scale Fetching XML for object detection Drawing rectangle fringing the pattern Yet, I couldn't achieve it.. Here's my code : #include<iostream> #include "cv.h" #include "highgui.h" #include<vector> using namespace cv; using namespace std; int main() { IplImage* img; img = cvLoadImage( "hindi3.jpg" ); vector<cv::Rect> objects; // ***Resize image to 64x64 resolution*** IplImage *resizeImage = cvCreateImage(cvSize(64,64),8,3); cvResize(img,resizeImage,CV_INTER_LINEAR);

Why when using this simple model with multiple outputs does Keras complain about a lack of gradients?

六月ゝ 毕业季﹏ 提交于 2019-12-06 15:43:39
So this problem occurs for in the context of a larger project, but I've assembled a minimal working example. Consider the following: input_1 = Input((5,)) hidden_a = Dense(2)(input_1) hidden_b = Dense(2)(input_1) m1 = Model(input_1, [hidden_a, hidden_b]) input_2 = Input((2,)) output = Dense(1)(input_2) m2 = Model(input_2, output) m3 = Model(input_1, m2(m1(input_1)[0])) print(m3.summary()) m3.compile(optimizer='adam', loss='mse') x = np.random.random(size=(10,5)) y = np.random.random(size=(10,1)) m3.fit(x,y) My expectation is that when evaluating this network, the output of hidden_b will simply

Which computer vision library & algorithm(s), for human behaviour analysis?

穿精又带淫゛_ 提交于 2019-12-06 15:13:38
问题 Objective: Detect / determine human actions, s.a. picking / lifting items to read label and keeping it back on rack (in a store), sitting-on, mounting/climbing-atom objects s.a. chair, bench, ladder etc. Environment: Store / shop, which is mostly well lit. Cameras (VGA -> 1MP), fixed (i.e. not PTZ). Constraints: Presence of known and unknown human beings. Possible rearrangement of objects (items for sale) in the store, over a period of time. Possible changes in lighting over time. For example

How can I adjust parameters for image processing algorithm in an efficient way?

天大地大妈咪最大 提交于 2019-12-06 14:41:33
Before starting implementation of solution for my problem I just want to be sure if I will not “reinvent wheel” and if I can reuse work that someone have done before. So my problem is: I have made image matcher using OpenCV library. This matcher receives a set of image files and trying to find similar images in database. At the end it returns statistical results according to ROC Curves definition (True Positive, True Negative, False Positive and False Negative number of matches). These results can vary because of OpenCV’s library algorithm parameters values, which are about 10. This means that

nominal-value inputs for Neural Network

痴心易碎 提交于 2019-12-06 14:00:32
I have a set of training data, each item in this set consists of 4 numerical values and 1 nominal-value which is the name of the method that these values have been calculated with. (There are 8 methods) I'm training a Neural Network with these. To get rid of the nominal-value I simply assigned a value from 1 to 8 to each method and used one input to pass it to Neural Network and 4 other inputs for numerical-values. It is sort of working, but the result is not as amazing as I want. So my question is could it be because of this simple assignment of numbers to nominal-values? or maybe it is