Why should weights of Neural Networks be initialized to random numbers? [closed]

Breaking symmetry is essential here, and not for the reason of performance. Imagine first 2 layers of multilayer perceptron (input and hidden layers): During forward propagation each unit in hidden layer gets signal: That is, each hidden unit gets sum of inputs multiplied by the corresponding weight. Now imagine that you initialize all weights to … Read more

What algorithm for a tic-tac-toe game can I use to determine the “best move” for the AI?

The strategy from Wikipedia for playing a perfect game (win or tie every time) seems like straightforward pseudo-code: Quote from Wikipedia (Tic Tac Toe#Strategy) A player can play a perfect game of Tic-tac-toe (to win or, at least, draw) if they choose the first available move from the following list, each turn, as used in … Read more

How to recognize rectangles in this image?

Opencv (image processing and computer vision library written in c) has implementation for hough transform (the simple hough transform find lines in an image, while the generalized one finds more complex objects) so that could be a good start. For the rectangles which do have closed corners there are also corner detectors such as cornerHarris … Read more

How to create a new gym environment in OpenAI?

See my banana-gym for an extremely small environment. Create new environments See the main page of the repository: https://github.com/openai/gym/blob/master/docs/creating_environments.md The steps are: Create a new repository with a PIP-package structure It should look like this gym-foo/ README.md setup.py gym_foo/ __init__.py envs/ __init__.py foo_env.py foo_extrahard_env.py For the contents of it, follow the link above. Details which … Read more

What are good examples of genetic algorithms/genetic programming solutions? [closed]

Not homework. My first job as a professional programmer (1995) was writing a genetic-algorithm based automated trading system for S&P500 futures. The application was written in Visual Basic 3 [!] and I have no idea how I did anything back then, since VB3 didn’t even have classes. The application started with a population of randomly-generated … Read more

support vector machines in matlab

SVMs were originally designed for binary classification. They have then been extended to handle multi-class problems. The idea is to decompose the problem into many binary-class problems and then combine them to obtain the prediction. One approach called one-against-all, builds as many binary classifiers as there are classes, each trained to separate one class from … Read more

What is the best Battleship AI?

I second the motion to do a lot more games per match. Doing 50 games is just flipping a coin. I needed to do 1000 games to get any reasonable distinction between test algorithms. Download Dreadnought 1.2. Strategies: keep track of all possible positions for ships that have >0 hits. The list never gets bigger … Read more