<aside>
🔥 Notes: If at any point during this process something is different from what I've described, just use common sense and do what seems right. Also, I'm having you download Python3.7, which is not the latest version of Python. You can download the latest version if you want, but I would advise against it since many libraries (and possibly NEAT) don't support versions above 3.7.
</aside>
-
Install Python3.7
- Go to https://www.python.org/downloads/release/python-379
- Scroll down to "Files"
- Download the file appropriate for your computer
- If you're on a Mac, download "macOS 64-bit installer"
- If you're on Windows, download whatever seems right (I've never done this on Windows)
- Open whatever file you've downloaded and follow any installation instructions it gives
-
Install PyCharm
-
Create a project
- Once you've finished hitting all the "next" buttons, click "New Project"
Naming your project
- You'll see some highlighted text at the top of the screen (it will probably be "pythonProject") – this is the name of your project
- Replace "pythonProject" with whatever you want to call your project
- Try to avoid changing the path before the name of your project
Setting your interpreter to Python3.7
- Next, notice where it says "Base interpreter:"
- You'll want to change it to Python3.7
- If it already is Python3.7, just skip this and click "Create" to create your project
- Click the dropdown next to "Base interpreter:" and see if Python3.7 is there
- If it is, just select it and click "Create" to create your project
- If it's not, you'll have to follow these steps:
- Click the button with three dots next to the dropdown next to "Base interpreter:" with the incorrect version of Python
- Enter the path to Python3.7 on your computer and hit "OK"
- Assuming the base interpreter is now set to Python3.7, you can now click "Create" to create your project
-
Paste Mr. Marshall's code into your project
- PyCharm will probably give you a default file called "main.py" with some junk code in it
- Just delete the code and click the red dot if there's a red highlighted line
- On the left file manager, right click on "main.py" and go to refactor>rename and rename the file to "neat-changeup" or something like that
- Paste Mr. Marshall's code (https://github.com/petemarshall77/changeup-neat-ai/blob/main/change-up.py) into the python file
- Right click on the highest folder in the file manager (it should be the name of your project) and click new file
- Call the file "config-feedforward.txt" (it must be called this for Mr. Marshall's code to work)
- Paste Mr. Marshall's config file (https://github.com/petemarshall77/changeup-neat-ai/blob/main/config-feedforward.txt) into this new text file
- You're almost ready to run the code, but you still need to have NEAT installed before you can do so
-
Install the necessary libraries
- At the top of your screen, go to PyCharm>Preferences
- Click the arrow next to "Project: (yourprojectname)"
- Click on "Python Interpreter"
- Click the "+" to add a new library
- Enter "neat-python" (just "neat" is not the library you want!" and hit "install package"
- Once it has installed, close the Preferences windows
- Go to the python code
- Right click and hit "Run '(yourfilename)'" to run the program
You should now have a basic understanding of PyCharm and how to create new files, install libraries, etc. If something just isn't working, message me on Slack and I'll try to get back to you as soon as possible.