Artificial intelligence (AI) is the branch of computer science and technology that studies the development of machines able to simulate aspects of human intelligence.
3
votes
1answer
35 views
Agar.io-like game
I've created a game (basically an Agar.io clone), where a human player is placed against AI controlled bots powered by a genetic algorithm and neural networks.
The problem is that I think that my ...
2
votes
0answers
44 views
Tic Tac Toe AI - library based on Minimax algorithm
I recently struggled with implementing AI in Tic Tac Toe game. For better understanding of minimax algorithm I've decided to separate AI's logic. When I finished I thought that some may find it useful,...
3
votes
1answer
37 views
A simple fully connected ANN module
I've written a simple module that creates a fully connected neural network of any size. The arguments of the train function are list of tuples with a training example array first and an array ...
2
votes
1answer
26 views
Multi or n-armed bandit reinforcement learning in R
I am learning about reinforcement learning and came across the first and simplest form of reinforcement learning system called multi-armed reinforcement learning (also called as n-armed bandit). I ...
10
votes
1answer
208 views
Yet another minimax tree for TicTacToe
I have written a working minimax tree for Tic-Tac-Toe. What I have done so far is create a tree with end node having value 10, 0 or -10 base on win, lose or draw. After I create a tree I then ...
4
votes
1answer
70 views
Tic Tac Toe algorithm using itertools
I'm looking for feedback on the readability of my code and opinions on the pick_best algorithm. I do this stuff for fun when I have time, and never get a chance to have anyone else look at it. ...
3
votes
1answer
83 views
Pong game with a random twist
I made a simple Pong game using SDL2, with a twist: You don't get to play :), only the 2 AIs get to. ;)
Because Pong is a very small game, I put everything in a single file (...
17
votes
2answers
387 views
The birth of my intelligent assistant: Khronos
I've done a lot of reworking to this main file recently, in regards to using a new speech recognition engine and integrating the last reviews suggestions. My question before is going to be phrased ...
6
votes
0answers
95 views
Making a logic Prolog compiler simpler with Java
Good morning!
I'm student in philosophy taking some course in programing in order to have a better understanding of artificial intelligence.
I'm actually doing my own Prolog compiler just like SWISH ...
4
votes
3answers
120 views
Hungry ant AI: any food here?
I'm working on a little AI to simulate ants (very basic). The full code can be found on Github. This function (in Ants.py) takes a list of Tuples containing ...
3
votes
1answer
75 views
Tic Tac Toe game AI in C++
I wrote a Tic Tac Toe game from scratch a couple days ago.
My AI doesn't always make the best moves, so I'd like some advice on how to improve it. I also hardcoded a move in a very specific ...
3
votes
1answer
106 views
Tic Tac Toe with 3 AI modes or Two-Player
This is my first stab at a game AI, and I've been working on multiple game mode difficulties, so I decided to start with a simple game. :) I'm most concerned about efficiency of the AI algorithms, and ...
7
votes
1answer
246 views
2 player chess game in C++
I have written a 2 player chess game in C++.
Things I have accomplished so far:
Legal moves validation
Bit board generation
Things I look forward to (would appreciate advice on them):
Move ...
1
vote
1answer
267 views
2
votes
1answer
217 views
Connect4 With AI
I have made a connect 4 console application in C++ and would love some feedback. In this project I have learned about inheritance and using virtual functions.
Main.cpp
...
6
votes
1answer
132 views
Alpha Beta Pruning Optimization
I made a class that would do alpha beta pruning on a binary tree of 40 degree. However there is a time limit on a single move of 30 seconds. I am to play against my professor and his opponent class. I ...
3
votes
1answer
61 views
Alpha Beta Pruning with binary tree of size 40
I'm working on a program that is supposed to use alpha beta pruning to find the best move for a game. The game is basically a binary tree of degree of 40 and each node will have a different float ...
14
votes
1answer
67 views
TicTacToe with AI in ruby - follow-up overload
I already posted this program numerous times, always surprised by the amount of improvement that is possible suggested by people here. Is it possible to make it even better, without nitpicking? At ...
6
votes
0answers
81 views
Chatty AI that saves .txt files to remember
This is a basic AI that I created. It has a teach function that creates a .txt file with user inputed info for future use. If you type teachme you have the option to type in something that you have ...
19
votes
1answer
141 views
21: The number with the curse
The goal of this game is to not say the number 21.
Rules:
You must only say numbers consecutive to the previous said number.
You may say 1, 2, or 3 numbers at a time.
For example:
Player 1 ...
5
votes
1answer
200 views
Tic-Tac-Toe AI Player
I made a simple tic-tac-toe AI app, where the AI, who is always O, wins or ties. I just wanted some input on it, and wanted to know if there was any ways to improve it (not the functionality of it, ...
3
votes
1answer
491 views
8-Puzzle using A* and Manhattan Distance
I have developed this 8-puzzle solver using A* with manhattan distance. Appreciate if you can help/guide me regarding:
1. Improving the readability and optimization of the code.
2. I am using sort to ...
3
votes
1answer
33 views
TicTacToe game with AI in ruby - follow-up
A week ago I posted my TicTacToe game follow-up question. The suggestions were referring mainly to the lack of polymorphism. Here's the new code, hopefully there's not a lot (or at all) to improve by ...
3
votes
0answers
854 views
Monkey-banana problem in Prolog
The monkey-banana problem: There many variations to this problem, but the basic premise is that a monkey is in a room with a banana and
a chair, and the monkey cannot reach the banana until he moves ...
1
vote
1answer
70 views
Neural Net XOR Genetic Algorithms
New to Neural Networks and before I move on to gradient descent I would like to make sure I have got basic idea right. (Sorry that the class is called perceptron I know that this isnt technically ...
4
votes
3answers
187 views
TicTacToe game with functional AI in ruby - follow-up
A month ago I posted an earlier version of the game here, and got a great response, which was mainly about the structure of my code. I freed some time today and reworked the code from scratch.
Things ...
1
vote
0answers
113 views
Markov chain chatbot producing poor results
In my high school AP computer science class we're making a very basic chatbot that replies with predefined answers. I decided to have a bit more fun with it
My program is basically this answer on ...
4
votes
2answers
118 views
Noughts and Crosses GUI game in Java - Part 2/2: GUI
(See also Noughts and Crosses GUI game in Java - Part 1/2: AI)
This part is dedicated to the View/Controller of the MVC pattern. So once again these are the building blocks of the Noughts and Crosses ...
3
votes
2answers
119 views
Noughts and Crosses GUI game in Java - Part 1/2: AI
(See also Noughts and Crosses GUI game in Java - Part 2/2: GUI)
I was working on a GUI game of Noughts and Crosses, and this is what I finally got:
Unfortunately, the entire source code for the ...
5
votes
2answers
469 views
Cleverbot Game in Java
This is a project I've been working on for a while. It's basically Cleverbot. What do you think?
...
5
votes
2answers
378 views
Simple TicTacToe game with AI in Ruby
What changes do you recommend from the perspective of structure, logic, etc?
...
6
votes
2answers
220 views
Ruby command line Mastermind game with AI
I've created a small command-line 'Mastermind' game using Ruby. The intent of the project (aside from having fun in the build!) was to learn and emphasize OOP concepts and principles.
The game has ...
2
votes
0answers
60 views
Binary Bayes network classifier in Java - Part II/II
This is the continuation of Binary Bayes network classifier in Java - Part I/II
TERMINOLOGY
We are given a directed acyclic graph (dag) \$G = (V, A)\$, where \$V\$ is the set of nodes and \$A \...
1
vote
1answer
761 views
Iterative deepening depth-first search heuristics to solve “3 Missionary And Cannibal” challenge
Missionaries and cannibals problem is a well known Toy Problem to learn basic AI techniques.
I implemented it using iterative deepening depth-first search algorithm. My state is represented by a 3-...
2
votes
0answers
110 views
Bayesian network query tool in Java
Suppose you are running a business of repairing cars. You know all the parts (graph nodes) and the way they affect other parts (directed edges), and you know the probabilities of each part failing. If ...
2
votes
2answers
297 views
Breadth-First Search heuristics to find solution to Water Jug Challenge
I started learning AI recently. In AI, searches should be avoided and everything in AI is a search problem.
One of the easiest problem where we could use general AI search techniques is the water jug ...
1
vote
0answers
122 views
Generalized Missionaries and Cannibals in Java - follow-up
See the previous and initial iteration.
Now I have incorporated all the points suggested by mdfst13, and have the following:
StateNode.java:
...
5
votes
1answer
1k views
Generalized Missionaries and Cannibals in Java
See the next iteration.
I was in the mood for some basic AI, and decided to code up an algorithm for solving "\$M\$ missionaries, \$C\$ cannibals in the boat with \$B\$ places" -algorithm:
Demo.java:...
2
votes
1answer
51 views
Randomly learning a neuron to act as a signal counter
I have this small program for learning an artificial neuron to act as a simple signal counter: my cell has four input wires (also called dendrites) and a single output wire (also called axon). If at ...
14
votes
2answers
1k views
Simple Self-Learning AI
This is a programming challenge I set for myself a while back to create an AI that starts with no knowledge of anything whatsoever, and learns as you talk to it. (It can learn stuff like your name, ...
11
votes
3answers
363 views
“AI” chat program
I've thrown together this simple chat program, and while it works. I think it could certainly use some improvement. Here's how it works.
Obtain user input by removing all punctuation from the input ...
8
votes
1answer
1k views
Connect 4 (glorified tic-tac-toe) implementation
I'm posting here my implementation of the game Connect 4. It's obviously a pretty trivial game and code but I'm primarily interested in any advice concerning improvements to the code structure: types, ...
4
votes
2answers
94 views
Calculating which direction my enemy should face when moving
I have just implemented an algorithm which calculates the direction an enemy in my game should face when moving to a location.
This is a 2D game where characters can face in one of four directions: (...
6
votes
1answer
242 views
Video Game AI State Change
I have here a snippet of code from a simple video game AI enemy. The basic idea behind the enemy is that he can be in one of a few states. By default he is in a patrolling state, where he moves ...
4
votes
2answers
90 views
Obstacle-avoiding AI
I have made a game in Java that involves two players to fight each other with spaceships. For one player mode, I have programmed a simple AI to avoid allies and asteroids and go straight towards the ...
6
votes
2answers
362 views
Another JavaScript Stack Exchange chat bot
I've been inspired by @SirPython's SirAlfred JavaScript chat bot, so I went and made my own. This one is slightly different though, in the fact that it can accept input in a more lenient way. For ...
11
votes
2answers
1k views
Simple 2048 AI in Python
A few weeks ago, I wrote a Python implementation of 2048. Since then, I've been working on a simple AI to play the game for me. The code uses expectimax search to evaluate each move, and chooses the ...
7
votes
2answers
158 views
BotClean challenge
I'm going through the artificial intelligence domain at HackerRank. I'm very new to this domain and I really need a guide on how should I minimize the number of if/<...
2
votes
0answers
75 views
AI for depth-first walking in a maze, with variable depth look ahead search for dead ends and finish point
This code is a part of a little game I've started a week ago.
It is too extensive to review at once, so I'm picking the most interesting and crucial parts.
Start with the AI.
It has public update ...
5
votes
2answers
832 views
Sudoku solver using forward checking
I was compelled to look into a Sudoku Solver in Java using the principles I have learned in a course, namely I wanted to make something that included backtracking and forward checking.
Has anybody ...