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

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_to_other_algorithms

Unsupervised clustering with unknown number of clusters

You can use hierarchical clustering. It is a rather basic approach, so there are lots of implementations available. It is for example included in Python’s scipy. See for example the following script: import matplotlib.pyplot as plt import numpy import scipy.cluster.hierarchy as hcluster # generate 3 clusters of each around 100 points and one orphan point … 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

Is it possible for a computer to “learn” a regular expression by user-provided examples?

Yes, it is possible, we can generate regexes from examples (text -> desired extractions). This is a working online tool which does the job: http://regex.inginf.units.it/ Regex Generator++ online tool generates a regex from provided examples using a GP search algorithm. The GP algorithm is driven by a multiobjective fitness which leads to higher performance and … Read more

Defeating a Poker Bot

Defeating a bot from the serverside perspective Many online poker sites use popup Captcha inputs that are triggered by suspicious activity. Some poker sites monitor playing times and patterns (i.e., worst case scenario is a player who plays 24×7 and 16 tables continuously, there is a tiny tiny chance this is a real human. (However … Read more

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)