Professional Documents
Culture Documents
LaTeX Tutorial
Raphael Bahati1
1 Ph.D. Candidate
DiGS, 2009
Outline
1 Introduction
Eclipse LaTeX Plugins
CVS and Eclipse
2 LaTeX Document
Document Layout
Document Formatting
3 Resources
TeXlipse: http://texlipse.sourceforge.net/
Setup
1 Set CVSROOT environment variable
CVSROOT=/csd/thesis/rbahati/DiGS
export CVSROOT
2 Create repository
cvs init
3 Initialize the project
cvs import -m "LaTeX" LaTeX-2009 rbahati start
Setup
1 Set CVSROOT environment variable
CVSROOT=/csd/thesis/rbahati/DiGS
export CVSROOT
2 Create repository
cvs init
3 Initialize the project
cvs import -m "LaTeX" LaTeX-2009 rbahati start
Small Document
\ documentclass [ j o u r n a l ] { IEEEtran }
\ usepackage { a l g o r i t h m }
\ usepackage { a l g o r i t h m i c }
\ usepackage { l i s t i n g s }
\ usepackage { e p s f i g }
\ begin { document }
\ t i t l e {Document T i t t l e }
\ author {Document Author }
\ maketitle
\ section { F i r s t S e c t i o n }
\ subsection { First Subsection }
\ subsubsection { First Subsubsection }
\ s u b s u b s e c t i o n { Second S u b s u b s e c t i o n }
\ s e c t i o n { Second S e c t i o n }
\ s u b s e c t i o n { Second F i r s t S u b s e c t i o n }
\ s u b s e c t i o n { Second Second S u b s e c t i o n }
\ b i b l i o g r a p h y s t y l e { IEEEtran }
\ bibliography { bib− f i l e }
\end{ document }
Large Document
\ documentclass [ 1 1 pt , l e q n o ] { r e p o r t }
\ usepackage {amsmath , amssymb , a m s f o n t s }
\ usepackage { l i s t i n g s }
\ usepackage { e p s f i g }
\ begin { document }
\ t i t l e {Document T i t t l e }
\ author {Document Author }
\ maketitle
\ pagestyle { p l a i n }
\ addcontentsline { t o c }{ c h a p t e r }{ C o n t e n t s }
\pagenumbering{roman}
\tableofcontents
\ include { ch−i n t r o d u c t i o n }
\ include { ch−m o d e l l i n g −RL}
\ b i b l i o g r a p h y s t y l e { IEEEtran }
\ bibliography { r a p h a e l −PhDDISSERTATION}
\ appendix
\ include { a p p e n d i x− p o l i c i e s }
\ include { a p p e n d i x−c y c l e }
\end{ document }
Chapter: ch-modelling-RL
\ chapter { Modelling Reinforcement Learning }
\ l a b e l { ch : m o d e l l i n g −RL}
\ s e c t i o n { S t a t e −T r a n s i t i o n Model }
\ l a b e l { s e c : s t a t e −t r a n s i t i o n −model }
\ s u b s e c t i o n { System S t a t e s }
\ l a b e l { s e c : system−s t a t e s }
\ s u b s e c t i o n { System T r a n s i t i o n s }
\ l a b e l { s e c : system−t r a n s i t i o n s }
\ s e c t i o n {Reward F u n c t i o n }
\ l a b e l { s e c : reward−f u n c t i o n }
\ section { Exploration / E x p l o i t a t i o n }
\ l a b e l { s e c : e x p l o r a t i o n −e x p l o i t a t i o n }
\ subsection { Exploration Strategy }
\ l a b e l { s e c : e x p l o r a t i o n −s t r a t e g y }
\ subsection { Exploitation Strategy }
\ l a b e l { s e c : e x p l o i t a t i o n −s t r a t e g y }
\ s e c t i o n { L e a r n i n g by R e i n f o r c e m e n t }
\ l a b e l { s e c : l e a r n i n g −by−r e i n f o r c e m e n t }
\ section { D i s c u s s i o n }
\ l a b e l { s e c : m o d e l l i n g −RL−d i s c u s s i o n }
documentstyle[options]{class}
1 {article}: 11pt, 12pt, twoside, twocolumn, draft, fleqn, leqno, acm
2 {report}: 11pt, 12pt, twoside, twocolumn, draft, fleqn, leqno, acm
3 {letter}: 11pt, 12pt, fleqn, leqno, acm
4 {book}: 11pt, 12pt, twoside, twocolumn, draft, fleqn, leqno
usepackage{package}
{amsmath,amssymb,amsfonts}: Mathematics
{epsfig}: Figures (.jpeg, .png)
{subfigure}: SubFigures
{listings}: Codes
{algorithm, algorithmic}: Algorithms
{multirow}: Table formatting
Bibliography
@INPROCEEDINGS; @TECHREPORT; @ELECTRONIC; @INBOOK;
@PHDTHESIS; @MASTERSTHESIS;
@INPROCEEDINGS{REF5 0 2 ,
TITLE=”{ R e i n f o r c e m e n t L e a r n i n g i n P o l i c y −d r i v e n Autonomic
Management } ” ,
YEAR=”2008” ,
PAGES=”899−−902”,
MONTH=” A p r i l ” ,
BOOKTITLE=”Network O p e r a t i o n s \& Management Symposium
(NOMS’ 0 8 ) ” ,
ADDRESS=”S a l v a d o r , Bahia , B r a z i l ” ,
FILE=” r a p h a e l −NOMS2 0 0 8 . p d f ” ,
AUTHOR=”Raphael M. B a h a t i and M i c h a e l A . Bauer ”
}
Reference
1 R. M. Bahati and M. A. Bauer, “Reinforcement Learning in Policy-driven
Autonomic Management,” in Network Operations & Management
Symposium (NOMS’08), Salvador, Bahia, Brazil, April 2008, pp. 899–902.
Tables: usepackage{multirow}
\ b e g i n { t a b l e } [ htb ]
\ begin { center }
\ begin { small }
\ begin { tabular }{| c | c | c | c | p{2.2 in }|}
\hline
S t a t e &$R {m { j }}ˆ{ k}$&$ f (R {m { j }}ˆ{ k })$&\ m u l t i c o l u m n {2}{ c | }
{$A( s { i } ) $ } \ \
\hline
$ s { i }$&$R {m { 1 } } ˆ { k}$&$ f (R {m { 1 } } ˆ { k })$&$ a { l }$& S t a t e a c t i o n \\
\hline
\ m u l t i r o w {4}{∗}{$ s {1}$}&\ m u l t i r o w {4}{∗}{$R {m {1}}ˆ{3}$}&
\ m u l t i r o w {4}{∗}{0}&$ a {0}$&\ t e x t t t {$\gamma$− a c t i o n }\\
\ c l i n e {4−5} & & &$a {1}$& \ t e x t t t { A d j u s t M a x C l i e n t s (+25)}\\
\ c l i n e {4−5} & & &$a {2}$& \ t e x t t t { AdjustMaxKARequests ( −30)}\\
\ c l i n e {4−5} & & &$a {3}$& \ t e x t t t { AdjustMaxBandwidth ( −128)}\\
\hline
\end{ t a b u l a r }
\end{ s m a l l }
\end{ c e n t e r }
\ c a p t i o n { Sample T a b l e . }
\ l a b e l { t a b : system−s t a t e s }
\end{ t a b l e }
Tables
k k
State Rm j
f (Rm j
) A(si )
k k
si Rm 1
f (Rm 1
) al State action
a0 γ-action
3 a1 AdjustMaxClients(+25)
s1 Rm 0
1
a2 AdjustMaxKARequests(-30)
a3 AdjustMaxBandwidth(-128)
Table: Sample Table.
Equations
\ begin { e q u a t i o n }
Q { 0 } ( s , a)=\ f r a c {\sum\ l i m i t s { p { j }\ i n [ P { v } ] { a }}
tanh [ S ( p { j } ) ] \ times W { a } ( p { j } ) } { \ | [ P { v } ] { a } \ | }
\ l a b e l { equ : a c t i o n −s t r e n g t h }
\end{ e q u a t i o n }
Eguation
P
tanh[S(pj )] × Wa (pj )
pj ∈[Pv ]a
Q0 (s, a) = (1)
k [Pv ]a k
Equations
\ begin { a l i g n }
S ( p { 1 } ) &= \sum\ l i m i t s { c { i }\ i n p { 1 } } c { i } . \ omega
\ times V( c { i } ) \\
&= \{\ f r a c {1}{6} \ times 0 . 0 5 8 8 \ } + \{\ f r a c {1}{6}
\ times 1 . 0 0 0 0 \ } \\
&= 0 . 0 0 9 8 + 0 . 1 6 6 7 \\
&= 0 . 1 7 6 5
\end{ a l i g n }
Equation
X
S(p1 ) = ci .ω × V (ci ) (2)
ci ∈p1
1 1
={ × 0.0588} + { × 1.0000} (3)
6 6
= 0.0098 + 0.1667 (4)
= 0.1765 (5)
Listings: usepackage{listings}
\ b e g i n { f i g u r e } [ htb ]
\ begin { center }
\ l s t s e t { l a n g u a g e=C++, numbers=l e f t , b a s i c s t y l e =\ t i n y }
\ l s t i n p u t l i s t i n g { l i s t i n g s / l i s t i n g . cpp }
\ l a b e l { l i s : l i s t i n g −cpp }
\ end { c e n t e r }
\ end { f i g u r e }
1 s t a t u s t A c t i o n T e s t L i s t : : g e t V a l i d A c t i o n T e s t ( A c t i o n T e s t I n f o ∗∗ e n t r y )
2 {
3 register int count ;
4 i f ( l o c k ( ) == NOTOK)
5 return NOTOK;
6 f o r ( c o u n t = 0 ; c o u n t < numItems ; c o u n t++)
7 {
8 i f ( a c t i o n L i s t [ c o u n t ] . t y p e != INVALID TEST )
9 {
10 ∗ e n t r y = &a c t i o n L i s t [ c o u n t ] ;
11 break ;
12 }
13 }
14 i f ( u n l o c k ( ) == NOTOK)
15 return NOTOK;
16 return OK;
17 }
0 ,A )
Algorithm 1 CreateState(Em v
Input: rmi ∈ MR P
Resources
1 CVS: http://www.csd.uwo.ca/˜rbahati/courses/CS212b/resources.html
2 LaTeX: http://frodo.elon.edu/tutorial/tutorial/node1.html
3 TeXlipse: http://texlipse.sourceforge.net/
4 Beamer: http://latex-beamer.sourceforge.net/