Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tic-Tac-Toe benchmark game to the project #197

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

GorogPeter
Copy link
Contributor

No description provided.

@zherczeg
Copy link
Collaborator

This code has a lot of ifs, that is good. What it does exactly? Tries all movements for all players and simply counts which one wins in which case?

@GorogPeter
Copy link
Contributor Author

This code has a lot of ifs, that is good. What it does exactly? Tries all movements for all players and simply counts which one wins in which case?

The whoWillWin function decides who has a wining stragegy at a given game-state. First, if someone has won at the given game-state, it returns the winner. Else, if there's no empty place, it returns that there's no winner. If there's empty place, it tries them, and returns the best (best for the current player). To sum up, it implements the MiniMax algorithm.

Copy link
Collaborator

@zherczeg zherczeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@clover2123
Copy link
Collaborator

Where did you get the source code of this benchmark?
I just wonder that there exist some collections of source code used for WASM testing

@GorogPeter
Copy link
Contributor Author

Where did you get the source code of this benchmark? I just wonder that there exist some collections of source code used for WASM testing

I wrote it on my own.
So far, I don't know such a collection.

Copy link
Collaborator

@clover2123 clover2123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@clover2123 clover2123 merged commit b6cbdb1 into Samsung:main Nov 23, 2023
@GorogPeter GorogPeter deleted the TicTacToe branch November 29, 2023 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants