
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{rsfs}

\usepackage{graphicx}
\usepackage{color}

\textheight 230mm
\topmargin 5mm
\textwidth 160mm
\oddsidemargin -2mm

\pagestyle{myheadings}
\markright{(Practice -- Neural Networks)}
\thispagestyle{empty}


\title{{\large (Brest State Technical University 2009 Spring Semester: Course Practice)}\\
Recurrent Neural Network - II}
\author{Akira Imada\\
(e-mail akira@bstu.by)\\
\hspace{1in}\\
This document is still under construction and was lastly modified on}

\newtheorem{excersize}{Excersize}

\begin{document}
\maketitle

\clearpage
\section{Model and Method}

\begin{figure}[h]
\begin{center}
\includegraphics[width=4.5cm,height=2cm]{plasticity-course.eps}
\end{center}         
\end{figure}

\subsection{Continuous Neuron}
\subsubsection*{Renew of states}
\begin{displaymath}
x_i(t+1) = f(\sum_{j=1}^N w_{ij}(t)x_j(t) + I_i)   \hspace{.3in} (i = 1,2,3\cdots, N)
\end{displaymath}

\subsubsection*{Transfer function -- Sigmoid}
\begin{displaymath}
f(x) = \frac {1 + \tanh(Gx)}{2}
\end{displaymath}

\footnote{
If your program language does not support $\tanh(x)$, like PASCAL, use the following formula:
$\tanh(x) = \sinh(x)/\cosh(x)$ where
$\sinh(x) = \{\exp(x) - \exp(-x)\}/2$, and
$\cosh(x) = \{\exp(x) + \exp(-x)\}/2.$
}

%%\noindent
%%where set $G=10$ for example.


\begin{figure}[h]
\begin{center}
\includegraphics[width=10cm,height=5cm]{sigmoid.eps}
\end{center}         
\end{figure}

\begin{excersize}
On your monitor screen, display 100 neuron each of which takes a state of continuous value from 0 to 1 at random. 
This is the pattern at $t=0$. Then renew states step by step ($t = 1, 2, 3, \cdots)$ and display states of 
100 neurons at each time step using a grey scale (white - grey - black). This may be like a rectangle Christmas Tree.
\end{excersize}

\subsection{A contrller of movile robot}
\noindent
Choose 10 neurons from those 100 neurons and connect them to two output neurons. To be more specific,
connect from the 91st neuron to the 95th neuron to output neuron 1 and from 96th neuron to 100th neuron to output neuron 2.
Connection weights from those 10 neurons to 2 output neurons should be all positive value from 0 to 1. Then the states
of these 2 output neurons are calculated as before:
\begin{displaymath}
o_1(t) = f(\sum_{j=91}^{95} w_jx_j(t))
\end{displaymath}
and
\begin{displaymath}
o_2(t) = f(\sum_{j=96}^{100} w_jx_j(t)).
\end{displaymath}
Then, we can make a robot navigate in a x-y coordinat by $x(t+1) = x(t) + o_1(t)$ and $y(t+1) = y(t) + o_2(t)$
starting from the origin $(0,0)$.

\begin{excersize}
Show the robot movement on your screen.
\end{excersize}


\subsection{Dynamics of states of neurons -- from atractor to chaos}
When we observe the change of state of each of these 100 neurons, you may found some are quiet (always 0), some are
stable (taking some value and not changing), and some are always change its value. However, its not so easy to observe
those changes, so we take an average of these 100 states. 
\begin{displaymath}
m(t) = \frac{1}{N} \sum_{i=1}^{N} x(t)
\end{displaymath}

\begin{excersize}
(1) Plot $m(t)$ as a function of t. (2) Also plot in the x-y cordinate as $x = m(t)$ and $y=m(t+1)$ for $t = 1, 2, \cdots$.
Observe the result with changeng G in the sigmoid function,  for example $G = 5.0, 5.2, 5.4, \cdots 6.9, 7.0.$
\end{excersize}



\subsection{Hebian Learning}
\subsubsection*{Update of weights}
\begin{displaymath}
w_{ij} (t+1) = w_{ij}(t) + \eta x_i(t+1) x_j(t)
\end{displaymath}

\begin{center}(where $\eta$ is called {\it learning rate} and set to  0.01 here, for example.)\end{center}

\end{document}

