Artificial intelligent assistant

Puzzle about six travellers going through bridge above canyon with an oil lamp There is a dark night and there is a very old bridge above a canyon. The bridge is very weak and only 2 men can stand on it at the same time. Also they need an oil lamp to see holes in the bridge to avoid falling into the canyon. Six man try to go through that bridge. They need 1,3,4,6,8,9(first man, second man etc.) minutes to pass the bridge. What is the fastest way for those six men to pass this bridge?

A minimal solution is:

* 1 and 6 cross the bridge; 1 comes back (7)
* 1 and 3 cross the bridge, 1 comes back (4)
* 8 and 9 cross the bridge; 3 comes back (12)
* 1 and 3 cross the bridge, 1 comes back (4)
* 1 and 4 cross the bridge (4)



Total is $7+4+12+4+4 = 31$. There are minor variations that are still minimal. For example, 3 can return in step 2 instead of in step 3.

I have nothing useful to say about how to find the solution; I programmed the computer to do an exhaustive search. I only posted this because the other guy was getting upvotes for his wrong answer.

By request, [my search program is available ]

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 4c7c4f27cf5c7310931b021a1b7ad0ba