FAQ Database Discussion Community


Artificial intelligence (or at least path generation) of entities in a 2-dimensional plane

c#,xna,artificial-intelligence,2d-games
TL;DR Given a 2-dimensional plane (say, 800x600 pixels or even 4000x4000) that can contain obstacles (static objects) or entities (like tanks, or vehicles), how can computer-controlled tanks navigate the map without colliding with static objects while pursuing other tanks? Please note that every static object or entity has the ability...

Functions change values in list even though list is not passed to functions

python,python-3.x,artificial-intelligence,breadth-first-search,water-jug-problem
I'm trying to implement a I.A. breadth-first-search-like algorithm to solve the Water Jugs problem but I encountered this problem: Every time I add a new element to the array, it changes all elements inside the array to be like it. In other words... The "frontier" array is changing all elements...

A method or delegate does not match other delegate parameters

c#,artificial-intelligence,neural-network
I'm creating an AI system for the Google Science Fair but I've hit a rock, I can't seem to find the error of this problem stated in the title. A search on Google returns null answers in the following topic. I'm using Monodevelop; Here is my code : using UnityEngine;...

Difference between Q-learning and Value Iteration

machine-learning,artificial-intelligence,q-learning
How is Q learning different from value iteration in reinforcement learning? I know Q learning is model-free and training samples are transitions (s,a,s',r). But since we know the transitions and the reward for every transition in Q learning, is it not the same as model-based learning where we know the...

Parent object not accessing variables from children's script

unity3d,triggers,artificial-intelligence,unityscript
I'm working on a project in Unity and I've created a script called DeerHater that targets the transform and controller of an object that enters the specified area. The script by itself works but it's connected to a parent object that has it's controller attached and that controller is supposed...

Is this Artificial Intelligence? [closed]

algorithm,artificial-intelligence
I made a program where cars try to drive along a road while avoiding hitting each other. The road is basically a series of crossroads, and the cars have to drive behind each other in a way that when the car in front brakes the car behind it matches the...

computing game Dots and boxes

artificial-intelligence,scripting-language
The game that I am trying to prove computability for is Dots and Boxes. Game Description . However, instead of using theorems I am trying to do so by creating an AI that is supposed to have 100% winrate in that game for either player 1 or player 2. If...

I need to make an AI character that follows the player when they reach a certain distance in C# XNA

c#,xna,artificial-intelligence,path-finding
Here is the code that I have so far for my game. I am wanting to create an AI character (BlackBall) that will follow the player (WhiteBall) when they are a certain distance away. I have no idea where to start to get this working but it will be a...

NLP - Word Representations

machine-learning,nlp,artificial-intelligence
I am working on a Word representation algorithm, similar to Word2Vec and GloVe.I have been asked to make it more dynamic, such that new words could be added to the vocabulary,and new documents could be submitted to the program even after the representations (vectors) have been created. The problem is,...

When is one heuristic better than another?

artificial-intelligence
I answered a question in which two heuristics were given for which A* was to be conducted to find a path from a start state to a goal state. One of the heuristics found a path by expanding one node less - now for this reason, would we say this...

Train neural network to determine color image quality [closed]

machine-learning,artificial-intelligence,neural-network
I'm looking for someone who know if it is possible to train a neural network to tell if the image provided live up to the trained expectation. Let's say we have a neural network which trained to read a 800x800 pixel color image. Therefore, I will have 1,920,000 input and...

Python: Reggular Expressions filtering for Self Learning program

python,regex,pattern-matching,artificial-intelligence
I am making a program that has a small way of self learning, but now I want to get "information" from the output like: >>>#ff0000 is the hexcode for the color red I want to filter with reggular expressions that the user filled this sentence is the hexcode for the...

Unexpected Behavior of Prolog program

algorithm,prolog,artificial-intelligence
I have written a prolog program to search for a path in an un-directed graph (or maze). pway(a, b,10). pway(b, e,10). pway(b, c,10). pway(d, e,10). pway(c, d,10). pway(e, f,10). pway(g, e,10). solve(X,X,T,N) :- write(T), N is 0. % do nothing solve(X,Y,T,N) :- pway(X, Z,C), not(member(Z, T)), solve(Z, Y, [Z|T],M), N...

Genetic Programming Semantics

artificial-intelligence,evolutionary-algorithm,genetic-programming
I am trying to implement genetic programming using random binary trees. It is essentially a parse tree with special subset of operators including: and, >, <. Note that in my implementation, I am merely comparing numbers. So it is obvious that leaf nodes cannot be operators given a certain predefined...

Prolog beginner help get current time

prolog,artificial-intelligence,swi-prolog
I am modifying the Eliza program http://cs.nyu.edu/courses/fall11/CSCI-GA.2110-003/documents/eliza.pl trying to get it to print the system time when user asks - What Time is it? After hours of reading through manual I got my get_date_time_value() function to work. As in get_date_time_value(Key, Value) :- get_time(Stamp), stamp_date_time(Stamp, DateTime, local), date_time_value(Key, DateTime, Value). However...

PyBrain: passing empty floats or switching them with neutral values?

artificial-intelligence,neural-network,pybrain
Right now, I am trying to pass this for a dataset sample: 7/2/2014,7:30,138.885,138.87,138.923,,,,138.88067,138.91434,138.895,,,,138.89657 14,138.9186042,138.8745387,138.923,138.9046667,138.895,138.8696667 But predictably, it gives me a value error since empty strings can't be converted into floats. What I want to do is to pass those empty variables in such a way the associated nodes will do...

Is there an AI, Machine, or Automated Theorem Prover that builds source code from input?

artificial-intelligence
I think my title is quite succinct. Is there an AI, Machine, or Automated Theorem Prover (ATP) that builds source code from input? A very simple idea of what I'm getting at is this "Hey AI/Machine/ATP, please build a 'hello world' source code." If not source code, what about creating...

Random movement attempt

random,unity3d,artificial-intelligence,unityscript
I'm trying to make my bear walk randomly when the player is not in it's range. I wanted it to randomly select the its rotation in y axis and then move it forward and after some time switch the rotation randomly again. The thing is that I don't really know...

Is h5 = (h1 + h2 + h3 ) / 3 admissible?

search,artificial-intelligence,heuristics
I am having a really hard time with the "math" aseptic of heuristic functions. I day dreamed for 3 minutes today in my AI class and I missed the explanation. Can someone explain to me how I can calculate if a heuristic function is admissible? I posted this one (...

the neural networks are too sensitive for the input

machine-learning,artificial-intelligence,neural-network
I have the following two feature vectors: 0.2567 0.2567 0.0105 0.0105 0.0000 -0.0000 -0.0000 0.0000 0.0000 0.0000 0.2567 0.2567 0.0105 0.0105 0.0000 -0.0000 -0.0000 0.0000 0.0000 0.0000 0.2567 0.2567 0.0105 0.0105 0.0000 -0.0000 -0.0000 0.0000 0.0000 0.0000 0.2567 0.2567 0.0105 0.0105 0.0000 -0.0000 -0.0000 0.0000 0.0000 0.0000 0.2567 0.2567 0.0105...

Traversing game state space : more search leads to bad results

algorithm,haskell,artificial-intelligence,traveling-salesman
I am cross posting this question from codereview as i found that it to be non-responsive. This problem is avaiable at hackerrank ai. I am not asking for solutions but trying to find what is wrong with my strategy or code. I am trying to solve a problem which i...

How does a convolutional neural network connect to the multi-layered perceptron?

machine-learning,artificial-intelligence,neural-network,convolution
Which operation takes place to produce the output from say a 9x9 filter and pass that output as the input to MLP.

prolog rules as arguments

prolog,artificial-intelligence,expert-system
I'm building an expert system shell based on Luger & Stubblefield's ExShell. In their system, they define rules in the following way: rule((Goal :- (Premise)), CF_Rule). Ignore the CF_Rule. An example of this syntax is: rule((fix(Advice) :- (bad_component(X),fix(X, Advice))), 100). I want to add an OR in certain rules, but...

STRIPS representation of monkey in the lab

artificial-intelligence,planning
I have been reviewing some material on the representation of an AI plan given the STRIPS format, and found that different people seem to formulate the same problem in different ways. For instance, Wikipedia has an example regarding the Monkey in the lab problem. The problem states that: A box...

What are units in neural network (backpropagation algorithm)

machine-learning,artificial-intelligence,neural-network,classification,backpropagation
Please help me to understand unit thing in neuron networks. From the book I understood that a unit in input layer represents an attribute of training tuple. However, it is left unclear, how exactly it does. Here is the diagram: There are two "thinking paths" about the input units. The...

How can I allow an API to remotely access my code without revealing it?

python,machine-learning,artificial-intelligence
A friend is building an API. He wants my machine learning algorithm (written in Python) to be incorporated into this API. I have heard that his API can 'remotely access' my algorithm and in this way I don't have to reveal what the code actually is. If this is all...

Adapting BFS to target multiple values [closed]

python,tree,artificial-intelligence,breadth-first-search
i have the following function program.the function BFS display a path from node to target/goal.how can i modify fuction BFS so that instead of taking a single character as a target,it should accept a list of characters. # tree stored as a dictionary (parent: [children]) simpletree = {'a': ['b', 'c'],...

Developing a Checkers (Draughts) engine, how to begin?

algorithm,logic,artificial-intelligence,game-engine
I'm a relatively inexperienced programmer, and recently I've been getting interested in making a Checkers game app for a school project. I'm not sure where I can start (or if I should even attempt) at creating this. The project I have in mind probably wouldn't involve much more than a...

Minimax algorithm in a game

algorithm,artificial-intelligence,minimax
Im trying to create my first game using the minimax algorithm but i dont know how to implement this using a tree. The game rules are the following: On table there are M cubes(for example 40) and each player must take from the table 1 or L cubes (L is...

Tic Tac Toe heuristic AI [duplicate]

algorithm,artificial-intelligence,tic-tac-toe,heuristics
This question already has an answer here: What algorithm for a tic-tac-toe game can I use to determine the “best move” for the AI? 8 answers I designed simple AI for 3x3 Tic Tac Toe game. However I didn't want to do neither complete search, nor MinMax. Instead i...

AI with complex board representation: simulating a single possible move [closed]

c#,artificial-intelligence,strategy
I am currently developing a turn-based grid-based strategy game (similar to Heroes of Might and Magic and Age of Wonders) using C#. Focusing on the combat part first. There are multiple units on a grid, taking turns on attacking, shooting, casting spells, moving and so on. Got a bit stuck...

What are “depression regions” in heuristic searches?

search,artificial-intelligence,heuristics
While reading about weighted heuristic searches, I came to know that they don't perform well in depression regions; what are "depression regions"?

Algorithm suggestion: comparing sound clips

algorithm,audio,artificial-intelligence
(Not sure if this is the right place for this question) We are analyzing thousands of sound clips of people talking in an attempt to find patterns in the pitch, syllable rate, etc. in order to come up with a signature database to match new sound bites to emotions. While...

(Java) Partial Derivatives for Back Propagation of Hidden Layer

java,machine-learning,artificial-intelligence,neural-network
Yesterday I posted a question about the first piece of the Back propagation aglorithm. Today I'm working to understand the hidden layer. Sorry for a lot of questions, I've read several websites and papers on the subject, but no matter how much I read, I still have a hard time...

Neural Network Error oscillating with each training example

machine-learning,artificial-intelligence,neural-network,backpropagation
I've implemented a back-propagating neural network and trained it on my data. The data alternates between sentences in English & Africaans. The neural network is supposed to identify the language of the input. The structure of the Network is 27 *16 * 2 The input layer has 26 inputs for...

Detecting circles and shots from paper target

image,opencv,image-processing,computer-vision,artificial-intelligence
I'm making a small project where i have to detect points scored from a given image of paper target. Something similar to TargetScan app for iPhone. I'm using openCV for processing image and basically i have two parts for this, one is to detect circles from a target(which works pretty...

How can i make my python3 code do many “if input” operations at once

if-statement,python-3.x,input,artificial-intelligence
I tried make an AI just to see if i could, i couldn't. but i want it to at least work. Here's my code: while True: if input(":") == "hello": print("Hello.") if input(":") == "good bye": print("Bye!") if input(":") == "how are you": print("Good, i don't feel much. You know,...

Chess AI with alpha beta algorithm

c++,algorithm,artificial-intelligence,chess,alpha-beta-pruning
I have implemented the alpha beta algorithm for my chess game, however it takes a lot of time (minutes for 4-ply) to finally make a rather stupid move. I've been trying to find the mistake (I assume I made one) for 2 days now, I would very much appreciate some...

Distance and metrics between datasets

dataset,artificial-intelligence,distance,hierarchy
I have almost 30 different data-sets. Each of them contain a different number of variables and the dimension is around 46. I'm trying to measure the distance between these data-sets, rather than the distance between the items within each data set themselves. My proposal is to find the mean for...

Linear regression poor gradient descent performance

c++,algorithm,machine-learning,artificial-intelligence,linear-regression
I have implemented a simple Linear Regression (single variate for now) example in C++ to help me get my head around the concepts. I'm pretty sure that the key algorithm is right but my performance is terrible. This is the method which actually performs the gradient descent: void LinearRegression::BatchGradientDescent(std::vector<std::pair<int,int>> &...

Having trouble creating my Neural Network inputs

machine-learning,artificial-intelligence,neural-network
I'm currently working on a neural network that should have N parameters in input. Each parameters can have M different values (discrete values), let's say {A,B,C,…,M}. It also has a discrete number of outputs. How can I create my inputs from this situation? Should I have N×M inputs (having 0 or 1 as value), or should I think of a different...

How to beat best chess engines? [closed]

artificial-intelligence,chess
i am currently learning and practising chess using stockfish engine. When i set the difficulty to maximum, it is impossible to win against these chess engines. Has the machines evolved that far to be intelligent? I have 2 quick questions for the chess fans here: What are the ways to...

How to determine which neurons to connect between layers in an artificial neural network?

artificial-intelligence,neural-network
Say for my first input layer I have 10 input nodes/neurons. Say my hidden layer has 10 neurons as well. My third and final layer is one output neuron. How do I connect the layers? Is there a technique for determining the best way to do this or do you...

Random Numbers in Unity3D?

c#,random,unity3d,artificial-intelligence
What I found was how to create random numbers. Great. This solution, however, was not working in other functions. To create a random number, I used Random randomDirection = new Random(); int directionChoice = randomDirection.Next(1, 4); inside of a function called enemyWalk(){}; However, this caused an error: Type 'UnityEngine.Random' does...

AI - PSO - Choosing the right representations

algorithm,artificial-intelligence,pso
Let's say I have a set S of N natural numbers and N subsets (S1, S2, ...Sn) of that set. I want to generate 2 subsets D1 and D2 ( D1 + D2 = S, D1 and D2 have no common elements ) so that D1 and D2 does not...

How Get Weight Matrix from NN FANN?

c,artificial-intelligence,neural-network,fann
I'm using FANN to use Neural Network. (Link to FANN) I need to get the matrix of weight after trained the network, but I didn't find anything from documentation. (Link to documentation) Do you know how get that matrix??? Thank you!...

Tree Implementation in MinMax with Alpha-Beta Pruning

java,artificial-intelligence,alpha-beta-pruning,minmax
I want to implement an AI (Artificial Intelligence) for a checkers-like game I have written the follow methods: -the method public List<Move> allMoves(){ ... } that returns me the list of all valid moves sorted by weight, where the weight is calculated according the kind of moves and the position...

Alpha-beta prunning with transposition table, iterative deepening

algorithm,artificial-intelligence,chess,alpha-beta-pruning,minmax
I'm trying to implement alpha-beta min-max prunning enhanced with transposition tables. I use this pseudocode as reference: http://people.csail.mit.edu/plaat/mtdf.html#abmem function AlphaBetaWithMemory(n : node_type; alpha , beta , d : integer) : integer; if retrieve(n) == OK then /* Transposition table lookup */ if n.lowerbound >= beta then return n.lowerbound; if n.upperbound...

Is it possible to cause a webpage, say a HTML5 game to simulate a key press with Javascript?

javascript,html5,artificial-intelligence,bots
I am new to JavaScript and programming in general. I will try to explain what I want to do as best I can. I have a very similar question to this guy, but I would like to do it in JavaScript as I somewhat know how to use it. Need...

How to get the annotated text for a DictionaryAnnotator

java,artificial-intelligence,opennlp,uimanageddocument,uima
I have a dictionary created from the DictionaryCreator from UIMA, I would like to annotate a piece of text using the DictionaryAnnotator and the aforementioned dictionary, I could not figure out how to get the annotated text. Please let me know if you do. Any help is appreciated. The code,...

C++ Return Type Deduction Based on Input Parameters

c++,c++11,artificial-intelligence
I am creating a "knowledge processor" which can handle multiple forms of data. The forms of data that I am planning to support are textual, visual, and auditory. Each can be represented via TEXT, VISUAL, and AUDIO, respectively. So every "knowledge", or data, is being represented in a structure called...

solve sudoku puzzle using A*(A-Star) search [closed]

algorithm,search,artificial-intelligence,a-star,sudoku
i want to solve sudoku puzzle using A* Search. how to define g(n) and h(n)?? what should h and g be?? i want to code that in python but any pseudo code would be appreciated...

How to choose an algorithm? [closed]

algorithm,artificial-intelligence,2d-games
I've to choose an algorithm for a given problem: The game has two players: x and o. The players take alternate turns, with player x moving first at the beginning of each game. Player x starts at position (1,1) while o starts at (8,8). Each turn, a player can move...

Building tree in Nim game

c,tree,artificial-intelligence,minimax
I want to create a game like Nim. The player can take 1 or M (defined) cubes and the winner is the player who takes the last cube. I will also create a minimax function, so the MAX player (always plays first) is making the best move. I started writing...