artificial-intelligence

Solving a puzzle game using AI

限于喜欢 提交于 2019-12-03 03:56:52
I have made a puzzle where the player slides blocks around to goals - the rules are fairly simple: Only one slider block may move at a time The object is to move the slider blocks into goal nodes - you only need to fill the goal nodes, not necessarily get all slider blocks into the goal nodes. If the slider block slides on ice, it will continue moving in that direction until it is stopped or moved If the slider block hits something solid (concrete, another block) it stops and can be moved again (not into the concrete, obviously) If the slider block slides onto wood, it stops on the wood and

A Genetic Algorithm for Tic-Tac-Toe

删除回忆录丶 提交于 2019-12-03 03:54:34
问题 So I was assigned the problem of writing a 5x5x5 tic-tac-toe player using a genetic algorithm. My approach was to start off with 3x3, get that working, and then extend to 5x5, and then to 5x5x5. The way it works is this: Simulate a whole bunch of games, and during each turn of each game, lookup in a corresponding table (X table or O table implemented as a c++ stdlib maps) for a response. If the board was not there, add the board to the table. Otherwise, make a random response. After I have

How can I implement the unification algorithm in a language like Java or C#?

◇◆丶佛笑我妖孽 提交于 2019-12-03 03:52:54
问题 I'm working through my AI textbook I got and I've come to the last homework problem for my section: "Implement the Unification Algorithm outlined on page 69 in any language of your choice." On page 69, you have the following pseudo-code for the unification algorithm: function unify(E1, E2); begin case both E1 and E2 are constants or the empty list: if E1 = E2 then return {} else return FAIL; E1 is a variable: if E1 occurs in E2 then return FAIL else return {E2/E1} E2 is a variable if E2

Using Markov chains (or something similar) to produce an IRC-bot

℡╲_俬逩灬. 提交于 2019-12-03 03:23:29
问题 I tried google and found little that I could understand. I understand Markov chains to a very basic level: It's a mathematical model that only depends on previous input to change states..so sort of a FSM with weighted random chances instead of different criteria? I've heard that you can use them to generate semi-intelligent nonsense, given sentences of existing words to use as a dictionary of kinds. I can't think of search terms to find this, so can anyone link me or explain how I could

Correct formulation of the A* algorithm

落爺英雄遲暮 提交于 2019-12-03 03:19:46
问题 I'm looking at definitions of the A* path-finding algorithm, and it seems to be defined somewhat differently in different places. The difference is in the action performed when going through the successors of a node, and finding that a successor is on the closed list. One approach (suggested by Wikipedia, and this article) says: if the successor is on the closed list, just ignore it Another approach (suggested here and here, for example) says: if the successor is on the closed list, examine

Support Vector Machine for Java?

跟風遠走 提交于 2019-12-03 03:14:11
问题 I'd like to write a "smart monitor" in Java that sends out an alert any time it detects oncoming performance issues. My Java app is writing data in a structured format to a log file: <datetime> | <java-method> | <seconds-to-execute> So, for example, if I had a Widget#doSomething(String) method that took 812ms to execute, it would be logged as: 2013-03-24 11:39:21 | Widget#doSomething(String) | 812 As performance starts to degrade (such as during a major collection, during peak loads, or if

What's the difference between uniform-cost search and Dijkstra's algorithm?

久未见 提交于 2019-12-03 02:55:21
问题 I was wondering what's the difference between uniform-cost search and Dijkstra's algorithm . They seem to be the same algorithm. 回答1: Dijkstra's algorithm, which is perhaps better-known, can be regarded as a variant of uniform-cost search, where there is no goal state and processing continues until all nodes have been removed from the priority queue, i.e. until shortest paths to all nodes (not just a goal node) have been determined http://en.wikipedia.org/wiki/Uniform-cost_search#Relationship

How to train a neural network to supervised data set using pybrain black-box optimization?

孤街浪徒 提交于 2019-12-03 02:46:40
问题 I have played around a bit with pybrain and understand how to generate neural networks with custom architectures and train them to supervised data sets using backpropagation algorithm. However I am confused by the optimization algorithms and the concepts of tasks, learning agents and environments. For example: How would I implement a neural network such as (1) to classify the XOR dataset using pybrain genetic algorithm (2)? (1) pybrain.tools.shortcuts.buildNetwork(2, 3, 1) (2) pybrain

How does Content-Aware fill work?

99封情书 提交于 2019-12-03 02:46:28
问题 In the upcoming version of Photoshop there is a feature called Content-Aware fill. This feature will fill a selection of an image based on the surrounding image - to the point it can generate bushes and clouds while being seamless with the surrounding image. See http://www.youtube.com/watch?v=NH0aEp1oDOI for a preview of the Photoshop feature I'm talking about. My question is: How does this feature work algorithmically? 回答1: I am a co-author of the PatchMatch paper previously mentioned here,

Lisp and Prolog for Artificial Intelligence? [closed]

送分小仙女□ 提交于 2019-12-03 02:44:26
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . Now since i've taken a class 3 years ago in A.I. im clearly proficient enough to ask this question......just kidding just kidding ;) but seriously, what is it about these languages that make them so popular for A.I. research. Even though A.I. research is "old"...it's came