Coder Social home page Coder Social logo

tictactoe3d's Introduction

Tic Tac Toe 3D

The Tic Tac Toe 3D Project allows users to play the very popular game Tic Tac Toe in 3D. It uses Google App Engine as its backend, and HTML5/CSS3/jQuery to create the front-end. Maven has been used as the build system.

Currently the game is available only in 2D, but the 3D update will roll out soon!! The game will feature a cool 3D UI, and will also support saving the game performance of a player in cloud. A mobile version of the same game is also being planned.

You can play the game here- [Tic Tac Toe 3D] 1

tictactoe3d's People

Contributors

prateekmathur1991 avatar

Watchers

 avatar  avatar

tictactoe3d's Issues

Creating a heuristic evaluation function for Minimax

As is evident right now, the algorithm is not playing as expected, even now.
I want the game to unbeatable, but still sometimes it is not playing appropriately.

I think the problem is with the deterministic evaluation function used in MinimaxBoard.java. I think we need to use a Heuristic evaluation function instead.

Minimax algorithm behaving strangely

After updating the TicTacToeApi to use the Minimax class to play, the app started running into an exception. After checking with the API Explorer, the exception was this-

"org.codehaus.jackson.map.JsonMappingException : No suitable constructor found for type :"

After some googling, I thought this is happening because Jackson accepts only POJO classes to convert Java object into JSON, and vice-versa. To fix this, I created a new Board class and made it the argument type and return type of the endpoint method.

When I did that, and executed the method on API explorer, the result was a disaster-

boardState sent as a request - "----X----"

Response received - "OOOOXOOOO"

This is a huge disaster, and needs to be fixed. For the time being, I have set the endpoint to use the simpleMove() method until the method is debugged, and I don't have the time to do that.

If anybody can fix this, fork my repo, work on it, and send me a pull request. I would be very happy if you can contribute to this project".

Minimax behaving unexpectedly

The coding for minimax algorithm is completed, and its testing has been started.

After getting minimax algorithm live on appspot, the algorithm is executing correctly, but the result is not as expected. After every run, the algorithm seems to play at the first empty place it finds.

Consider this scenario-
The initial boardString sent is- ----X----
and the response is- O---X----

Now, the next boardString sent is - O-X-X----
The response is- OOX-X----

Ideally, the algorithm should have played like this- O-X-X-O--. This would have blocked the user's impending victory, and the game could have continued. But instead, the algorithm is simply playing on the first empty block it finds. THIS NEEDS TO BE FIXED.

I have started debugging the algorithm, but have not found anything helpful. Will continue debugging although.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.