# Unexpected text alignment in beamer with wrapfig [closed]

I'm trying to write a poster using beamerposter package. I'm getting a strange behaviour of text alignment when using wrapfig. I attached the result and i encircled the strange behaviour. On the left side text starts on the next line even if i didn't insert a \par neither a \newline. I expected the sentence starting with "The agent learns..." would have continued from the line above, after "..environment itself.". On the right side, in addition to the aforesaid wrong behaviour, the text goes to the next line without a reason.

Here the code snippet:

\documentclass{beamer}
%\usepackage{ragged2e}
%\let\raggedright=\RaggedRight

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
%
%\usepackage[sc]{mathpazo}
\usepackage{newtxtext,newtxmath}
%\usepackage{mathptmx} %<-- font times
%\usepackage[urw-garamond]{mathdesign}
\usepackage[T1]{fontenc}
%
\usepackage{graphicx}
\usepackage{color}
\usepackage{tikz}
\usepackage{subfigure}
\usepackage{wrapfig}
\usepackage{fancybox}
\usepackage{microtype}
\usepackage{indentfirst}
\usepackage[numbers]{natbib} % <- bibliografia personalizzata
\usepackage[orientation=portrait,size=a1]{beamerposter}

\mode<presentation>
{
%\usetheme{PAI2012}
\usetheme{I6dv}
}

\begin{document}

\begin{frame}
\begin{columns}[t]

\begin{column}{.5\linewidth}

\begin{block}{Abstract}
The purpose of this work involves the application and the evaluation of a \alert{Reinforcement Learning (RL)} based approach to address the problem of controlling the steering of a vehicle. The car is required to drive autonomously on unknown tracks without never going out of the way. The problem has been solved by using a simple neural network with two neurons, and according to the \alert{ASE-ACE algorithm}. The evaluation has been carried out with referring to The Open Racing Car Simulator (TORCS).
\end{block}

\begin{block}{Background}
Reinforcement Learning (RL) is a learning paradigm for neural networks based on the idea of an agent which is placed into a certain environment and it is required it learns to take proper actions without having any knowledge about the environment itself. %
%
\begin{wrapfigure}{l}{.5\linewidth}
\centering %
\includegraphics[width=\linewidth]{../images/aseace}
\caption{The ASE-ACE neural model.}
\label{fig:aseace}
\end{wrapfigure}
%
The agent learns by trial and error: an entity called \emph{critic} observes the agent's behaviour and punishes or rewards the agent if it executes respectively wrong or proper actions; these kinds of judgements on the action taken are said \emph{reinforcements} \cite{michie1968boxes}.
%
A simple neural model for RL implementation is shown in \figname\ref{fig:aseace} and was proposed in \cite{barto1983neuronlike}.
%
This model is based \emph{only} on punishments: the critic never rewards the agent.
\end{block}

\begin{block}{The Problem Model}
The problem has been modelled as follows:
\begin{itemize}
\setlength{\parindent}{2em}
\item The car speed depends on an auxiliary control system, here modelled as a \emph{black-box} on which it is not actually possible to act or get information.
\item A set of proximity sensors (i.e. laser range-finders) are installed on the vehicle and each of them provides the distance from the sensor itself and the nearest track boundary into its range \cite{cardamone2008masterthesis}.
\item The steering control output is given by a real value in the range $[-1,1]$; positive values produce a steering left rotation, a right rotation the negative ones.
\item The steering control system does not have any kind of knowledge on the surrounding environment or the physical laws that regulate the car motion.
\end{itemize}

\end{block}

\end{column}

\begin{column}{.5\linewidth}

\begin{block}{Sensors and State Decoding}
The configuration used in this work uses only three sensors as shown in \figname{\ref{fig:msens}}: the front sensor is oriented as the major axis of the car, while the side ones have an orientation of respectively $\pm 45^{\circ}$ relative to the major axis of the car. %
%
\begin{wrapfigure}{l}{.5\linewidth}
\centering
\includegraphics[width=\linewidth]{../images/sensori}
\caption{Proximity sensors model.}
\label{fig:msens}
\end{wrapfigure}
%
The range of the front sensor is up to 100mt and that of the side sensors is up to 50mt.
Two non-linear staircase quantization function for the sensors signals were used, each of them with 5 thresholds: the former with "large" thresholds for the front sensor, the latter with an higher resolution for the side sensors.

\end{frame}

\end{document}

Here the actual result:

Any idea?

EDIT: the commented use of ragged2e package has been left on the example code because using \RaggedRight at the beginning of a beamer block, it results in giving a better hyphenation but seems to "resize" the lines above the figures, as they became narrower.

The bundle of the latex project (which compiles) can be found here: http://dl.dropbox.com/u/9439473/postertest.zip