Python Forum
[PyGame] Window not updating
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Window not updating
#1
I have made a simple neural network to solve the xor problem but the issue lies in PyGame. I've used PyGame to display a neural network in real time as the weights are being adjusted over 10,000 iterations of training data. Everything runs fine with no errors, but the PyGame window is not updating to show the progress of the neural network.

Here's a link to my GitHub repository so you can understand the problem I'm having:
https://github.com/michaelberge8/Neural-Network

Running through the training data in main.py, on line 39 a Graphics object gr is passed into the train function. Moving into neural_network.py, on line 86 gr calls the function draw and passes in the information about the network in a matrix. Moving into graphics.py into the draw function, the nodes and weights are updated and drawn and then we exit the loop.

Problem: When the window is displayed the weights should basically be rapidly changing color from red to black depending on if they're negative or not, but the window is not updating for some reason so they are only shown in their initial state.

I'm not sure if anyone can help me, this problem is very specific so let me know if I can clarify anything. This is my first post to a forum, I've read all of the rules. If there's anything in this forum post that I'm doing wrong please let me know so I can fix it.
Reply


Messages In This Thread
Window not updating - by mberge - Jun-19-2019, 09:00 PM
RE: Window not updating - by nilamo - Jun-19-2019, 09:39 PM
RE: Window not updating - by metulburr - Jun-19-2019, 11:33 PM
RE: Window not updating - by mberge - Jun-21-2019, 12:12 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020