Skip to content

kentan/SmartBird

Repository files navigation

#SmartBird

SmartBird is artificial intelligence, AI, platform for Mahjong.

SmartBird provides the function that enable programmers to make thier own AI based on their strategy.

All programmers must have to do is to decide which tile(牌)should be discarded at each turn. Calculating the point will be done by Smartbird.

#How to use

How to run sample code.

You can see the Mahjong game by sample AI players by the following steps.

  1. Build the project with maven.
    %> cd ./Smartbird/
    %> mvn install

  2. Deploy the sb.war to the Tomcat.
    %> cp ./SmartBirdRestfulServer/target/sb.war <Tomcat installDir>/webapp/sb.war

  3. Launch the SmartBird.
    Open the brower and access to the following URL.
    https://localhost:8080/sb/index.html

  4. Start game
    Click "start" button. The game will start.

How to make your original AI.

  1. Execute the pom in order to obtain sbengine.jar. %> cd ./Smartbird/
    %> mvn install

  2. Make the class inherited from AbstractGamePlayer that is implemented in sbengine.jar.

  3. Implement the "notifyTurn" method.
    The method is called when the game is your turn. You need to decide which tile(牌) should be discarded. This is where you implemeted the AI for Mahjong.

  4. Implement the "notifySteal" method.
    The medhod is called when other players discard tiles. You need to decide whether you would like to pong(ポン), chow(チー) or ron(ロン).

  5. After implementing your AI, execute the pom again. %> cd ./Smartbird/
    %> mvn install

  6. Deploy the sb.war to the Tomcat.
    %> cp ./SmartBirdRestfulServer/target/sb.war <Tomcat installDir>/webapp/sb.war

  7. Launch the SmartBird.
    Open the brower and access to the following URL.
    https://localhost:8080/sb/index.html

  8. Start game
    Click "start" button. The game will start.

About

Mahjong Artificial intelligence,AI, platform for Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published