Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (29 sloc) 2.348 kb


In AI course, we are required to design and implement an agent to play GO with each other. In the stage of preparation, we are suggested to use a mature GTP engine in C implementation. However, I'm eggache. I started to search whether there is a java version. Finally, I was frustrated that, such a thing I have ever found is not Open Source! So I decided to implement one ^ ^.

What is EEE

Well, it is not another abbreviation for IEEE, it is just EEE. When ACMers are happy, or don't know what to say, they always shout "E E E!". In Chinese, it may means "Goose, Goose, Goose". That's all.

What is GTP

GTP, or Go Text Protocol is a protocol for communicating between two agents who are playing computer go. Go is a traditional Chinese Game, which brings great challenges in AI area. The version I implemented is GTP 2, draft 2, which is required by my AI course.


The whole project is built by ant(Well, I'm trying to use maven).

|Agent Algorithm (Visitor)|
          | |
          | |
|        Command          |
          | |
          | |
|       Connection        |

Connection is responsible to set up a stream for communication. An agent will continuely read command in a connection. After something is received, an agent should use Command Factory to parse it, and generate a command. A command take some parameters, and should be handled with a Command Visitor.

By the way, I implement all gtp types in package e3gtp.connection. I use Visitor Pattern here, since every agent algorithm is a visitor of commands. Therefore, the agent should keep state machine of itself. After visit a command, a command visitor should generate a Response. A response includes an ID(optional), whether succeed, and the response body according to the protocol.


Author: Li Shijian

Jump to Line
Something went wrong with that request. Please try again.