It's funny, I've also been trying to use AI to implement (simpler) shadow mapping code and it has failed. I eventually formed a very solid understanding of the problem domain myself and achieved my goals with hand written code.
I might try to implement this paper, great find! I love this 2000-2010 stuff
Oh, boy, then I have something for you:
https://artis.inrialpes.fr/Publications/2003/HLHS03a/SurveyR...
https://mrelusive.com/publications/papers/SIMD-Shadow-Volume...
https://terathon.com/gdc05_lengyel.pdf