Bot that plays tetris.
- OMP for paralleling
- CMake as build system
- osmanip as external library
| 1 thread | 2 threads | 4 threads |
|---|---|---|
![]() |
![]() |
![]() |
| ~120ms | ~66ms | ~53ms |
| — | 1.8 times faster | 2.2 times faster |
-
Download our latest release
-
In the downloaded folder:
$ mkdir build $ cd build $ cmake .. -
Compile project:
$ make -
And run it:
$ ./TetrisBotIf you want to change the number of threads (by default all threads are used), you should run the project like this:
$ OMP_NUM_THREADS=x ./TetrisBotwhere
xis preferred number of threads.Note: If you want to change the time between frames, you have to go in
settings.h, change the value ofFrameTimeto whatever you want, and then compile project again. In the same way, you can change the number of pieces known to the bot (value ofKnownPiecesCount), but keep in mind that the calculation time will grow exponentially.


