prateekmathur1991 / tictactoe3d Goto Github PK
View Code? Open in Web Editor NEWRepository for the Tic Tac Toe 3D Project
License: GNU General Public License v3.0
Repository for the Tic Tac Toe 3D Project
License: GNU General Public License v3.0
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".
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.