I heartily suggest you head over to hpmor.com, and read Harry Potter and the Methods Of Rationality.
It’s written by Eliezer Yudkowsky (an AI researcher), and it all flows from one essential divergence from JK Rowling’s canon. What if Harry’s aunt Petunia had married an Oxford professor, rather than Vernon Dursley? Harry’s raised in a supportive family, with a keen respect for the scientific method, and then gets the letter inviting him to Hogwarts.
You might be thinking it can’t be good if it’s fan fiction, but I’d point out that David Brin is a fan, and it’s running at 4.5/5 from over 500 reviews on GoodReads.