-
1Install Python in your (Embedded) Hardware
Follow the instructions https://www.python.org/getit/
-
2Clone or Download the "N-Queens Problem" repository
You can find the repository here: https://github.com/lemariva/N-Queens-Problem
-
3Temperature
The repository includes a file "temperature.py". This is coded to get the temperature (CPU & GPU) of a Raspberry Pi. If you are not using a Raspberry Pi, you need to modify this file to get the hardware temperature or just delete it.
-
4Run the code
Type in your console/cmd the following:
queenpool_multithread.py multithread_output.csv 12 4 100
This code example solves the N-queens problem with N=12 using 4 threads and repeats the process 100 times, the results are saved in a CSV file called "multithread_output.py".
You can modify the 4 parameters as you wish.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.