Raymond Hettinger - Modern solvers: Problems well-defined are problems solved - PyCon 2019
Speaker: Raymond Hettinger
Every programmer should learn to use solvers, tools that reason directly from a description of a problem to its solution.
Tools like AlphaZero can formulate winning strategies for games given only a description of the rules of the game. For certain classes of problems, we really can just let the computer do the work.
In this talk, we learn principles, techniques, and multiple examples for three solvers available in Python.
The first tool is a generic puzzle-solving framework that employs tree search strategies. We apply it to a simple sequencing problem and then to a harder sliding-block puzzle. Next, we'll look at the solver code to learn how it works. I'll also show an essential optimization technique and how to humanize the output. We demonstrate our skills by solving another famous puzzle.
The second tool is called a SAT solver. It is one of the miracles of the 21st century. From first principles, I'll show you what problems it solves and the way problems need to be described for modules like *PycoSAT*. I'll provide helper functions to humanize our interactions with this great tool. Then, we'll demonstrate our skills by creating a Sudoku solver and a readable logic problem solver.
The third tool is the ""multi-armed bandit"". It is a generic reinforcement learning algorithm that is easy to learn, powerful, and applicable to a broad class of problems. We apply it to winning rock-paper-scissors using pattern recognition.
Lastly, I'll summarize DeepMind's paper on AlphaZero which was published in the December 2018 edition of *Science*. This gives us hints at the full potential of these techniques.
Pure Python source code and examples are provided for all of the tools.
Slides can be found at: rhettinger.github.io
Пікірлер: 50
Wow. Another great talk by a brilliant person who has contributed so much to Python. Thanks Mr. Hettinger!
I went to this talk and have been waiting for the slides and code. Hettinger is badass
@raymondhettinger9603
5 жыл бұрын
The slides and running code can be found at rhettinger.github.io/
Raymond Hettinger, you sir are a Genius. Hats off
This is an unbelievably deep and great talk. You are a great one, Raymond Hettinger!
Sharing this with my week collab / problem solving group. Thanks Raymond.
Qa-Pla' ! This was fantastic, like all of his talks.
It wasn't Asimov who said "Any sufficiently advanced technology is indistinguishable from magic.", but Clarke
@kootenpv
4 жыл бұрын
@Michael David I don't - I just happened to be reading Asimov at the time 😅
Hey, this second puzzle is called "l'âne rouge" in French (apparently "Klotski" in english). Very interesting puzzle, it's kind of hard, but not as hard as rubik's cube (for example). My father got crazy with this puzzle he even wrote a program to prove me his solution was optimal. At the time I wasn't convinced as code looked a bit magic to me (don't try to impress your kids with a program you wrote).
amazing talk!
the SAT part reminds me of PROLOG programming language
This guy makes nerds looks COOL!
Did I miss it were Linear (Mixed Integer Linear) solvers like cplex or cbc(PuLP) omitted? They're some of the most powerful tools out there.
The second puzzle is online at www.alanabelden.com. You can see its solution too (play button under "Show Solve").
I mean I’ve been on Key & Peel marathon... but never would I thought I would be on a Raymond Hettinger marathon. And I don’t even speak much English lol.
@nick18303
4 жыл бұрын
JJ JJ only found him recently but he’s awsome
AlphaZero's next challenge should be the game of Stratego. It might be some time before they can beat the World's top Stratego players.
@Achrononmaster
4 жыл бұрын
Nah, it should be live Rugby.
Slides can be found here: github.com/rhettinger/rhettinger.github.io or here: www.dropbox.com/s/q3yi69d033v03pi/hettinger_solvers.zip?dl=0 The second link contains the code, the first does not appear to have it.
The slides and running code can be found at rhettinger.github.io/
Raymond tweeted that "Slides and running code are at: www.dropbox.com/s/q3yi69d033v03pi/hettinger_solvers.zip"
I wonder if one could do something like Test Driven Development using some of this techniques.
@drd105
3 жыл бұрын
you can definitely test multi-threaded code by testing all possible orders in which the primitives can execute.
Slides and running code: www.dropbox.com/s/q3yi69d033v03pi/hettinger_solvers.zip?dl=0
slides is here: rhettinger.github.io
Link to the slides could be found in this tweet by Raymond: twitter.com/raymondh/status/1125242663588864001
Yep - both links 404
@AvilPageYT
5 жыл бұрын
Slides: rhettinger.github.io/overview.html
@raymondhettinger9603
5 жыл бұрын
The slide links are updated. The slides and running code can be found at rhettinger.github.io/
For those looking for a link to slides: rhettinger.github.io/
Please fix the slide links.
@morvan68mt
5 жыл бұрын
rhettinger.github.io/ is where they're at
@raymondhettinger9603
5 жыл бұрын
The links are updated now.
@Nicole-px3ll
5 жыл бұрын
@@raymondhettinger9603 thank you!
Slides: rhettinger.github.io
The slide links are broken just FYI
@DiptangsuGoswami
5 жыл бұрын
www.dropbox.com/s/q3yi69d033v03pi/hettinger_solvers.zip?dl=0 maybe this works?
@MichaSiemek
5 жыл бұрын
rhettinger.github.io/index.html
Slides rhettinger.github.io/overview.html
All of these things have happened before. All of these things will happen again. (BA)
The link to the slides is here: rhettinger.github.io/ (via this tweet: twitter.com/raymondh/status/1125872117080137729)
Thanks. Now everyone will cheat in coding competitions.
He posted these on twitter: www.dropbox.com/s/q3yi69d033v03pi/hettinger_solvers.zip?dl=0
rhettinger.github.io/ - link to slides
See his tweet for slide and code links: twitter.com/raymondh/status/1125183886139580418
I know most of the things he is saying . Like the math and all . But can't understand what is going on . Can someone help me . Sorry for being a tubelight . 🙃
First viewer