Hi!
This is a constraint satisfaction problem (CSP), which Prolog is very suitable for. I've completed a lot of Prolog projects, e.g. a sudoku solver, so I think I could complete yours as well because they're both instances of CSP. You can send me the details over chat. if you want to.
Best, Milos