matlab codes for ymaze