Presentation Notes - Amphro.com

chardfriendlyΤεχνίτη Νοημοσύνη και Ρομποτική

16 Οκτ 2013 (πριν από 3 χρόνια και 9 μήνες)

89 εμφανίσεις

AI
Nuggets
Presentation
Notes
: AI Libraries


Libraries


-

Creating versatile libraries is hard because each problem can be completely
different from the previous.

-

Lots of path finding and search libraries exist because they are a little bit
easier to gener
alize.

-

Not a lot of AI learning libraries exist, and the ones that do are open source.
These libraries are often incomplete or very basic. Hard to generalize the
problem set.

-

Some examples: A* Tactical Path finding for multi
-
unit strategy, PathLib for
in
dividual and group path finding, FANN (Fast artificial neural network),
FFLL (free fuzzy logic library)


Garfixia Libraries


-

Open source, written in c++

-

Patrick Bergen created these libraries to learn AI techniques. He states
exactly what he did and didn’t

do, what are the problems, and the experience
he went through. He also gives all the resources he used to help him create
the libraries. Very informational.

-

He wrote
Fuzzy Logic
,
Genetic Algorithms
,
Neural Networks
,
Natural
Language Processing
,
Decision

Trees
,
Finite State Machines
,
Frame Systems,
Semantic Networks, Unification
,
Maes Behavior Network
,
Sparse Distributed
Memory
,
Belief, Desire, Intention: dMARS
, and some others.

-

Decided to only talk about one, Genetic Algorithms.


What was implemented?


-

Three classes and an interface. The interface (CGeneticGenome) should be
implemented by a custom class describing the problem space. It contains all
domain specific code of some problem. The first class, CGeneticModel,
represents the genetic algorithm. It
may be customized in a few ways, and
excuted. This model uses a single population, of the class CGeneticPopulation,
which is populated at initialization time. After that, the individuals of the
population, the genomes, are changed and moved only, but not d
estroyed
and created. This should make a lot of difference in execution time.

-

The model is able to handle both fixed length and variable length genomes
.
As the model evolves, the genomes lengths can change.

-

The interface makes it possible to use any repres
entation you want for the
problem at hand. The interface serves as an interface (indeed) between the
application and the algorithm.

-

Parent selection types (used to select parents from the previous generation
to serve as parents for the next generation): Se
lection by rank, Roulette
Wheel, and Tournament.

-

Crossover types: fixed length one point, fixed length two points, fixed length
multiple, variable length one point.

-

Mutation types: change a gene, swap two genes.


Comments


-

This implementation is generic, b
ut very limited.

-

The possibilities of extending and modifying a genetic algorithm are large. I
made a consideration between studying long on this subject to gain deeper
insight in its intricacies, and moving on to other subjects and I chose the
latter, be
cause its more important to me now to gain a wide understanding of
available AI techniques.

-

I do believe that my architecture may be extended without to much hardship.

-

Algorithms can be addictive. The drug is to make more and more
adjustments to the algor
ithm to make it find the solution in the fastest
possible way. The problem for me was not to lose the generality of the
architecture, in order to optimize the test problem I choose (the n
-
Queens
problem).

-

I found that testing is very important here, since
the algorithm can almost
always find a solution sooner or later, even though you completely fucked up
some of the code.

-

At one time I removed a bug and noticed that the algorithm become slower.
That was really annoying.

-

Since the algorithm is tweakable in

so many ways, it itself is a candidate for
optimization through a Genetic Algorithm.




Torch



A machine learning library written in c++


How it works


Idea and API

-

Torch is a machine
-
learning library

-

Written in C++

-

Aims to provide the best algorithms

-

In development forever

-

Features



Many gradient
-
based methods, including multi
-
layered perceptrons, radial
basis functions, and mixtures of experts.


Many small "modules" (Linear module, Tanh module, SoftMax module, ...)
can be plugged together.



Support

Vector Machine, for classification and regression.



Several Distribution package and classes for speech recognition with
embedded training.



Ensemble models such as Bagging and Adaboost.



Non
-
parametric models such as K
-
nearest
-
neighbors, Parzen Regre
ssion
and Parzen Density Estimator.


-

There are only four important concepts in Torch. Each of them are
implemented in a generic class. And almost all classes of Torch are subclasses
of one of them.

-

DataSet: this class handles the data. Subclasses could be
for static or dynamic
data, for data that can fit in memory or on disk, etc…

-

Machine: a black
-
box that, given an (optional) input and some (optional)
parameters, returns an output. It could be for instance a neural network, or a
mixture of gaussians.

-

Train
er: this class is able to train and test a given machine over a given
dataset.

-

Measurer: when given to a trainer, it prints in different files the measures of
interest. It could be for example the classification error, or the mean
-
squared
error.



Applicat
ions


Face recognition


Google Portrait : Powered by Idaip Research institute

http://www.idiap.ch/googleportrait/


Bio Login: A Bi
-
Modal Face and Speech Login System

http://www.idiap.ch/biologin/


Resources


Library References


http://睷眮潧牥wd⹯牧.睩wi/ind數⹰.p/䱩扲b物敳


http://t汤p⹯牧.
䡏坔W/ht浬彳楮杬支䅉
-
䅬Afe
-
䡏坔O/⍳猲⸱


呯牣T


http://睷眮w潲oh⹣栯浡t潳otut潲oa氮ldf


Ga牦ixia⁁


http://睷眮w潳oi敲
-
and牥r献s整/ai/条⹨t浬