Would anyone know of a website or something that has information about how to write a successful MahJong tile placement algoritm? ie tell a computer how to place tiles on a board so that there is always at least 1 possible solution. I'm stumped how to do it, I keep running into small niches in my head.

Thank you!

David