Typo.
[flatland.git] / README.md
1 # Introduction #
2
3 This is an implementation of a simple 2d physics simulator usable from
4 the pytorch framework.
5
6 The main function is
7
8 ```
9 torch.ByteTensor generate_sequence(bool pulling,
10                                    int nb_sequences,
11                                    int nb_images,
12                                    int image_height, int image_width,
13                                    int nb_shapes,
14                                    bool random_shape_size, bool random_colors)
15 ```
16
17 where
18
19  * `pulling` indicates if one of the shape should be pulled upward,
20  * `nb_sequences` is the number of sequences to generate,
21  * `nb_images` is the number of frames per sequence,
22  * `image_height` and `image_width` is the individual image size,
23  * `nb_shapes` is the number of rectangular shapes in the simulation,
24  * `random_shape_size` states if the shapes should be of different sizes,
25  * `random_colors` states if they should be of different colors.
26
27 The returned ByteTensor has five dimensions:
28
29  * Sequence index
30  * Image index
31  * Channel (3 since it is RGB)
32  * Pixel row
33  * Pixel col
34
35 Warning: For improper parameters values (e.g. too many shapes, too
36 small images), the simulation may be stuck.
37
38 # Installation and test #
39
40 ```
41 make -j -k
42 ./build.py
43 ./flatland-test.py
44 ```