Randomly textured Lambertian surface provides broad band cosine emission and thus is suitable for photovoltaic application. Nonetheless, variation of efficiency and non-optimized nature of randomly textured devices are undesirable. Here it is shown that using genetic algorithm, a 4×4 binary quasi-random grating can provide 23% higher absorption than 2D periodic grating and 103.5% higher than planar cells, approaching Lambertian limit. The improvement is attributed to broad band transmission for high energy photon and broad band waveguiding effect for low energy photons. Large scale fully-optimized binary grating can potentially surpass Lambertian limit due to its optimized nature and should be employed for future thin-film photovoltaic devices to reduce film thickness and cost.