Making a Chess Playing Robot

I am on a college project of making a chess playing Robot. Most of the Hardware and controlling parts are done. I now just need to do the Chess software parts. For this I have been searching for quite a time now and I got winboard. I am doing most of my programming in matlab. I now need some way to communicate with external programs such as winboard itself. I want it to go like this
1. I command to start a new game (white/black)
2. I send it the move made by user
3. It should send me back the best move.
I don't want to (actually I also don't know how) directly communicate with chess engine because that involves doing a alot of work on my part , such as, setting the options, difficulty, checking if moves are valid, opening books etc etc which I don't even know. I would like to set these options from external program. In short, I just want the normal winboard program but just with 2 enhancements
1. Accept the user-move from matlab through simple interface
2. Return back the computer move to matlab again through simple interface.
Can some one point me to what I should be doing?
1. I command to start a new game (white/black)
2. I send it the move made by user
3. It should send me back the best move.
I don't want to (actually I also don't know how) directly communicate with chess engine because that involves doing a alot of work on my part , such as, setting the options, difficulty, checking if moves are valid, opening books etc etc which I don't even know. I would like to set these options from external program. In short, I just want the normal winboard program but just with 2 enhancements
1. Accept the user-move from matlab through simple interface
2. Return back the computer move to matlab again through simple interface.
Can some one point me to what I should be doing?