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 AI opponent #1

Open
roh1th-s opened this issue Oct 16, 2024 · 6 comments
Open

Add AI opponent #1

roh1th-s opened this issue Oct 16, 2024 · 6 comments
Assignees
Labels
Bounty: 1500 enhancement New feature or request hacknight-2024 Hacknight 2024 issue hacktoberfest Hacktoberfest issue

Comments

@roh1th-s
Copy link
Collaborator

The game currently only works with 2 human players. Implement an AI opponent to play against.

  • A simple minimax algorithm with alpha-beta pruning may be used for this. Alternatively, interface with an existing chess engine like StockFish through UCI. Make any necessary changes to the data structures currently used to represent the game/board.
  • The AI needs to run on a separate thread so it doesn't interfere with rendering and hang the game. Use mutexes to share data between threads and keep track of whether the AI has finished processing or not. The AI thread may be suspended and resumed whenever necessary.
  • The code to start and stop the AI may be added in the update function in gameplay_state.c. The moves returned by the AI then needs to be made on the board.
@roh1th-s roh1th-s added enhancement New feature or request hacktoberfest Hacktoberfest issue hacknight-2024 Hacknight 2024 issue Bounty: 1500 labels Oct 16, 2024
@nalin1o1
Copy link

assign me this

@roh1th-s
Copy link
Collaborator Author

!assign @nalin1o1

@bunsamosa-bot
Copy link

bunsamosa-bot bot commented Oct 18, 2024

Hey @roh1th-s! The timer for the @nalin1o1 to work on the issue has finished, deassign and assign a new contributor or extend the current timer. Contact maintainer leads if inactive @DedLad @polarhive @achyuthcodes30

@roh1th-s
Copy link
Collaborator Author

!deassign

@roh1th-s
Copy link
Collaborator Author

!assign @nalin1o1 120

@bunsamosa-bot
Copy link

bunsamosa-bot bot commented Oct 18, 2024

Hey @roh1th-s! The timer for the @nalin1o1 to work on the issue has finished, deassign and assign a new contributor or extend the current timer. Contact maintainer leads if inactive @DedLad @polarhive @achyuthcodes30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bounty: 1500 enhancement New feature or request hacknight-2024 Hacknight 2024 issue hacktoberfest Hacktoberfest issue
Projects
None yet
Development

No branches or pull requests

2 participants