artificial-intelligence

TicTacToe strategic reduction

拥有回忆 提交于 2019-12-04 18:17:41
问题 I decided to write a small program that solves TicTacToe in order to try out the effect of some pruning techniques on a trivial game. The full game tree using minimax to solve it only ends up with 549,946 possible games. With alpha-beta pruning, the number of states required to evaluate was reduced to 18,297. Then I applied a transposition table that brings the number down to 2,592. Now I want to see how low that number can go. The next enhancement I want to apply is a strategic reduction.

Iterative Deepening A Star (IDA*) to solve n-puzzle (sliding puzzle) in Java

蓝咒 提交于 2019-12-04 17:08:25
I've implemented a program able to solve the n-puzzle problem with A*. Since the space of the states is too big I cannot precompile it and I have to calculate the possible states at runtime. In this way A* works fine for a 3-puzzle, but for a 4-puzzle can take too long. Using Manhattan distance adjusted with linear conflicts, if the optimal solution requires around 25 moves is still fast, around 35 takes 10 seconds, for 40 takes 180 seconds. I haven't tried more yet. I think that's because I must keep all visited states, since I'm using functions admissible but (I think) not consistent (i

What is the difference between monotonicity and the admissibility of a heuristic?

做~自己de王妃 提交于 2019-12-04 15:50:51
问题 I'm reading over my AI textbook and I'm curious about what the difference is between monotonicity and admissibility of heuristics (I know they aren't mutually exclusive). As far as I can tell, an admissible heuristic simply means you are ensured to get the shortest path to a solution if one exists. What I'm struggling with is the concept of the monotonic property. Can someone describe this to me in a way I might understand? Similarly, how can I determine if a given heuristic is monotonic

Python Rule Based Engine [closed]

拈花ヽ惹草 提交于 2019-12-04 14:28:10
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I am looking to design a system that will essentially need to make decisions based on input. The input will be a person. class Person: def __init__(self, name, age, sex, weight, height, nationality): self.name = name self.age = age self.sex = sex self.weight = weight self.height =

How to implement an interactive decision tree in C#

半城伤御伤魂 提交于 2019-12-04 13:39:04
I need to allow the users choose their own path by picking between two simple choices displayed on their screen in order to progress to the next set of choices, until they get to one of the endings, i.e something like this should be achieved: I have tried the following code, but only the left side is evaluated each time. I am wondering how can I achieve a results like the above image (covering all the branches)? For instance, if the user selects "No" the application shouldn't ask any further question from the user and just simply shows the "Maybe you want a Pizza" message. I have done this

Backprop implementation issue

丶灬走出姿态 提交于 2019-12-04 13:30:10
问题 What I am supposed to do. I have an black and white image (100x100px): I am supposed to train a backpropagation neural network with this image. The inputs are x, y coordinates of the image (from 0 to 99) and output is either 1 (white color) or 0 (black color). Once the network has learned, I would like it to reproduce the image based on its weights and get the closest possible image to the original. Here is my backprop implementation: import os import math import Image import random from

Which language should I use for Artificial intelligence on web projects

房东的猫 提交于 2019-12-04 13:18:21
问题 I have to do one project for my thesis involving Artificial intelligence, collaborative filtering and machine learning methods. I only know PHP/mysq/JS, and there is not much AI stuff examples in PHP. There are some books on AI on internet but they use Java , Python. Now I have to apply AI techniques on web application. Which language should i choose java or python. I searhed on internet that I can call java classes inside my php so that can help as as I am very good at php I have also seen

Alpha beta search time complexity

主宰稳场 提交于 2019-12-04 12:17:43
问题 I understand the basics of minimax and alpha-beta pruning. In all the literature, they talk about the time complexity for the best case is O(b^(d/2)) where b = branching factor and d = depth of the tree, and the base case is when all the preferred nodes are expanded first. In my example of the "best case", I have a binary tree of 4 levels, so out of the 16 terminal nodes, I need to expand at most 7 nodes. How does this relate to O(b^(d/2))? I don't understand how they come to O(b^(d/2)).

Tensorflow Count Objects in Image [closed]

与世无争的帅哥 提交于 2019-12-04 12:00:05
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . New to machine learning so looking for some direction how to get started. The end goal is to be able to train a model to count the number of objects in an image using Tensorflow. My initial focus will be to train the model to count one specific type of object. So lets say I take

Evolutionary Algorithms: Optimal Repopulation Breakdowns

只谈情不闲聊 提交于 2019-12-04 11:56:24
问题 It's really all in the title, but here's a breakdown for anyone who is interested in Evolutionary Algorithms: In an EA, the basic premise is that you randomly generate a certain number of organisms (which are really just sets of parameters), run them against a problem, and then let the top performers survive. You then repopulate with a combination of crossbreeds of the survivors, mutations of the survivors, and also a certain number of new random organisms. Do that several thousand times, and