By using Solomonoff Induction on all possible universes, and updating on the existing chapters. :D
Or it could simply say that it understands human psychology well (we are speaking about a superhuman AI), and understands all clues in the existing chapters, and can copy Eliezer's writing style... so while it cannot print an identical copy of Eliezer's planned ending, with a high probability it can write an ending that ends the story logically in a way compatible with Eliezer's thinking, that would feel like if Elizer wrote it.
Oh, and where did it get the original HPMoR chapters? From the (imaginary) previous gatekeeper.
So, two issues:
1) You don't get to assume "because superhuman!" the AI can know X, for any X. EY is an immensely complex human being, and no machine learning algorithm can simply digest a realistically finite sample of his written work and know with any certainty how he thinks or what surprises he has planned. It would be able to, e.g. finish sentences correctly and do other tricks, and given a range of possible endings predict which ones are likely. But this shouldn't be too surprising: it's a trick we humans are able to do too. The AI's predict...
Previous thread
If it's worth saying, but not worth its own post (even in Discussion), then it goes here.
Notes for future OT posters:
1. Please add the 'open_thread' tag.
2. Check if there is an active Open Thread before posting a new one.
3. Open Threads should be posted in Discussion, and not Main.
4. Open Threads should start on Monday, and end on Sunday.