root 8 years ago
parent
commit
04cf11c210
2 changed files with 26 additions and 18 deletions
  1. 14
    10
      README-en.md
  2. 12
    8
      README-es.md

+ 14
- 10
README-en.md View File

@@ -4,11 +4,11 @@
4 4
 ![main2.png](images/main2.png)
5 5
 ![main3.png](images/main3.png)
6 6
 
7
-[Verano 2016 - Rafa - Ive]
7
+[Verano 2016 - Rafa - Ive- Tatiana]
8 8
 
9
-One of the advantages of using computer programs is that we can easily implement repetitive tasks. Structures such as the `for`, `while`, and `do-while` allow us to repeat a block of instructions as many times as needed. These structures are also referred to as *repetition structures*. 
9
+One of the advantages of using computer programs is that we can easily implement repetitive tasks. Structures such as `for`, `while`, and `do-while` allow us to repeat a block of instructions as many times as needed. These structures are also referred to as *repetition structures*. 
10 10
 
11
-Algorithms are one of the fundamental concepts in Computer Science. Given a small set of instructions and the basic programming structures, we can solve many problems. In this laboratory experience you will practice the creation of algorithms simulating a robot that must explore a space using a set of very limited instructions.
11
+Algorithms are one of the fundamental concepts in Computer Science. Given a small set of instructions and the basic programming structures, we can solve many problems. In this laboratory experience, you will practice the creation of algorithms simulating a robot that must explore a space using a set of very limited instructions.
12 12
 
13 13
 ##Objectives:
14 14
 
@@ -36,7 +36,7 @@ Before arriving to the laboratory you should have:
36 36
 
37 37
 ## Counting Squares
38 38
 
39
-In this laboratory experience we will be programming a robot that has been placed in a grid of square rooms. Each one of the four walls in each room can have a door. Only the walls of adjoining rooms have doors. The walls that make up the grid's exterior do not have doors.
39
+In this laboratory experience, we will be programming a robot that has been placed in a grid of square rooms. Each one of the four walls in each room can have a door. Only the walls of adjoining rooms have doors. The walls that make up the grid's exterior do not have doors.
40 40
 
41 41
 ---
42 42
 
@@ -130,9 +130,11 @@ In the example, the code is trying to move the robot as many times as it can tow
130 130
 ---
131 131
 
132 132
 
133
-!INCLUDE "../../eip-diagnostic/repetitions-countingsquares/en/diag02.html" <br>
133
+!INCLUDE "../../eip-diagnostic/repetitions-countingsquares/en/diag02.html" 
134
+<br>
134 135
 
135
-!INCLUDE "../../eip-diagnostic/repetitions-countingsquares/en/diag01.html" <br>
136
+!INCLUDE "../../eip-diagnostic/repetitions-countingsquares/en/diag01.html" 
137
+<br>
136 138
 
137 139
 
138 140
 ---
@@ -162,7 +164,7 @@ Suppose that the robot is currently in the upper left room (northwest) of a **sq
162 164
 
163 165
 5. Suppose we want to minimize the amount of energy used by the robot. Can you create an algorithm that uses less steps for the same grid size?
164 166
 
165
-6. Once you have finished your algorithm, and made it correct and efficient, hand it in using Delivererable 1 in Moodle. On the algorithm's header, write and explain the expression you found about the number of rooms the robot should visit to complete its task for a grid of size $$n \times n$$ (For example, "The robot takes 2x+5 steps, 5 to arrive at the middle and 2n to count the rest").
167
+6. Once you have finished your algorithm, and made it correct and efficient, hand it in using Deliverable 1 in Moodle. On the algorithm's header, write and explain the expression you found about the number of rooms the robot should visit to complete its task for a grid of size $$n \times n$$ (For example, "The robot takes 2x+5 steps, 5 to arrive at the middle and 2n to count the rest").
166 168
 
167 169
 
168 170
 ### Exercise 2 -  Rectangular grid
@@ -179,13 +181,13 @@ Suppose that the robot is currently in the upper left room (northwest) of a **sq
179 181
 
180 182
 ### Exercise 3 - Rectangular grid, random position
181 183
 
182
-**Instrucciones**
184
+**Instructions**
183 185
 
184 186
 1. Suppose that now the robot starts its task in any of the rooms in a **rectangular** grid (not necessarily square). Design an algorithm so the robot can compute the number of rooms there are in the grid.
185 187
 
186 188
 2. To test this part of the program you should make sure the `MainGameWindow` object is created using the argument `Mode::RECT_RANDOM`.
187 189
 
188
-3. Once you have finished your algorithm, and made it correct and efficient, implement it in the `main` function. In the header of the program, write and explain the expression you found about the number of rooms the robot should visit to complete its task for a grid of size  $$m \times n$$. In this case, the number of rooms to visit will depend on the robot's initial position, so express the worst case, i.e. according to your algorithm, how many rooms should the robot visit if it starts in the *worst* room.
190
+3. Once you have finished your algorithm, and made it correctly and efficiently, implement it in the `main` function. In the header of the program, write and explain the expression you found about the number of rooms the robot should visit to complete its task for a grid of size  $$m \times n$$. In this case, the number of rooms to visit will depend on the robot's initial position, so express the worst case, i.e. according to your algorithm, how many rooms should the robot visit if it starts in the *worst* room.
189 191
 
190 192
 4. Hand in the `main.cpp` file with the code to calculate the number of rooms in a rectangular grid with the robot in a random position using Deliverable 3 in Moodle.
191 193
 
@@ -221,4 +223,6 @@ Use the "Deliverable" links in Moodle to hand in the algorithm for Exercise 1 an
221 223
 
222 224
 ## References
223 225
 
224
-[1] Luther A. Tychonievich, Mark S. Sherriff, and Ryan M. Layer, http://nifty.stanford.edu/2015/tychonievich-sherriff-layer-counting-squares/
226
+[1] Luther A. Tychonievich, Mark S. Sherriff, and Ryan M. Layer, http://nifty.stanford.edu/2015/tychonievich-sherriff-layer-counting-squares/
227
+
228
+

+ 12
- 8
README-es.md View File

@@ -4,7 +4,7 @@
4 4
 ![main2.png](images/main2.png)
5 5
 ![main3.png](images/main3.png)
6 6
 
7
-[Verano 2016 - Rafa - Ive]
7
+[Verano 2016 - Rafa - Ive- Tatiana]
8 8
 
9 9
 Una de las ventajas de utilizar programas de computadoras es que podemos realizar tareas repetitivas fácilmente. Los ciclos como `for`, `while`, y `do-while` son  estructuras de control que nos permiten repetir un conjunto de instrucciones. A estas estructuras también se les llama *estructuras de repetición*.
10 10
 
@@ -51,7 +51,7 @@ Los únicos comandos que entiende el robot son:
51 51
 1. Verificar si hay una puerta en la pared del norte (N), sur (S), este (E) u oeste (W) del cuarto donde se encuentra.
52 52
 2. Moverse al cuarto que queda justo al norte (N), sur (S), este (E) u oeste (W) del cuarto actual.
53 53
 4. Crear variables y asignarle valores.
54
-3. Realizar operaciones suma, resta, multiplicación y división.
54
+3. Realizar operaciones de suma, resta, multiplicación y división.
55 55
 5. Usar estructuras de decisión y repetición.
56 56
 6. Desplegar resultados a pantalla.
57 57
 
@@ -95,7 +95,7 @@ int main(int argc, char *argv[]) {
95 95
 
96 96
 En el ejemplo estamos creando un robot dentro de un espacio cuadrado que solo sabe verificar si hay una puerta hacia el oeste y (si hay puerta) caminar hacia esa misma dirección.  Veamos la función, línea por línea.
97 97
 
98
-La primera línea crea el único objeto que debes crear, un objeto de clase `MainGameWindow`. El parámetro `Mode::SQUARE_TOP_LEFT` especifica que la cuadrícula será cuadrada y que el robot comenzará en la esquina superior izquierda. Otras opciones para el parámetro son `RECT_TOP_LEFT`, `RECT_RANDOM` y `PYRAMID_RANDOM`.
98
+La primera línea crea el único objeto que debes crear, un objeto de clase `MainGameWindow`. El parámetro `Mode::SQUARE_TOP_LEFT` especifica que la cuadrícula será un cuadrado y que el robot comenzará en la esquina superior izquierda. Otras opciones para el parámetro son `RECT_TOP_LEFT`, `RECT_RANDOM` y `PYRAMID_RANDOM`.
99 99
 
100 100
 `MainGameWindow *w = new MainGameWindow(Mode::SQUARE_TOP_LEFT);`
101 101
 
@@ -129,9 +129,11 @@ En el ejemplo, el código está tratando de mover al robot todas las veces que p
129 129
 
130 130
 ---
131 131
 
132
-!INCLUDE "../../eip-diagnostic/repetitions-countingsquares/es/diag02.html" <br>
132
+!INCLUDE "../../eip-diagnostic/repetitions-countingsquares/es/diag02.html" 
133
+<br>
133 134
 
134
-!INCLUDE "../../eip-diagnostic/repetitions-countingsquares/es/diag01.html" <br>
135
+!INCLUDE "../../eip-diagnostic/repetitions-countingsquares/es/diag01.html" 
136
+<br>
135 137
 
136 138
 
137 139
 ---
@@ -150,11 +152,11 @@ Supón que el robot se encuentra en el cuarto superior izquierdo (extremo noroes
150 152
 1. Carga a `QtCreator` el proyecto `CountingSquares`. Hay dos maneras de hacer esto:
151 153
 
152 154
     * Utilizando la máquina virtual: Haz doble “click” en el archivo `CountingSquares.pro` que se encuentra  en el directorio `/home/eip/labs/repetitions-countingsquares` de la máquina virtual.
153
-    * Descargando la carpeta del proyecto de `Bitbucket`: Utiliza un terminal y escribe el commando `git clone http:/bitbucket.org/eip-uprrp/repetitions-countingsquares` para descargar la carpeta `repetitions-countingsquares` de `Bitbucket`. En esa carpeta, haz doble “click” en el archivo `CountingSquares.pro`.
155
+    * Descargando la carpeta del proyecto de `Bitbucket`: Utiliza un terminal y escribe el comando `git clone http:/bitbucket.org/eip-uprrp/repetitions-countingsquares` para descargar la carpeta `repetitions-countingsquares` de `Bitbucket`. En esa carpeta, haz doble “click” en el archivo `CountingSquares.pro`.
154 156
 
155 157
 2. Configura el proyecto. El proyecto consiste de varios archivos. **Solo escribirás código en el archivo** `main.cpp`. Los demás archivos contienen funciones que implementan la funcionalidad de las instrucciones que entiende el robot.
156 158
 
157
-3. Al escribir tu algoritmo debes asegurarte de que el objeto `MainGameWindow` es creado usando el argumento `Mode::SQUARE_TOP_LEFT`.  Recuerda, el robot no sabe de antemano cuantos cuartos hay. Prueba tu algoritmo con algunos ejemplos.
159
+3. Al escribir tu algoritmo debes asegurarte de que el objeto `MainGameWindow` es creado usando el argumento `Mode::SQUARE_TOP_LEFT`.  Recuerda, el robot no sabe de antemano cuántos cuartos hay. Prueba tu algoritmo con algunos ejemplos.
158 160
 
159 161
 4. Si el tamaño de la cuadrícula es 3x3, ¿cuántos cuartos debe visitar el robot para completar tu algoritmo? ¿Qué tal 4x4? ¿Qué tal $$n \times n$$ cuartos?
160 162
 
@@ -219,4 +221,6 @@ Utiliza los enlaces "Entrega" en Moodle para entregar el algoritmo del Ejercicio
219 221
 
220 222
 ## Referencias
221 223
 
222
-[1] Luther A. Tychonievich, Mark S. Sherriff, and Ryan M. Layer, http://nifty.stanford.edu/2015/tychonievich-sherriff-layer-counting-squares/
224
+[1] Luther A. Tychonievich, Mark S. Sherriff, and Ryan M. Layer, http://nifty.stanford.edu/2015/tychonievich-sherriff-layer-counting-squares/
225
+
226
+