Spent some time on bidirectional path tracing(BPT) in PBRT. At many parts of the code,
I had to do it by try and error. Debugging is a pain. The implementation may
still be wrong in some details, but generally it performs much better than path (PT)
tracing built-in in PBRT.
Here is the Cornell Box scene rendered with path tracing. Note the area light
pointing towards the ceiling making the scene mostly illuminated by indirect lighting.

This is the same scene rendered with my bidirectional path tracing implementation.

Both images are rendered with similar amount of time, 1400 seconds (25 samples/pixel) for bidirectional
path tracing v.s. 1510 (100 samples/pixel) seconds for pure path tracing. However, BPT produced much smoother
lighting than PT because it incorporates information from light sources, just like photon mapping.