/blackjack-chatgpt-recommendation

Simple blackjack game with ChatGPT prediction whether to hit or stand

Primary LanguageJavaScriptDo What The F*ck You Want To Public LicenseWTFPL

Blackjack ChatGPT Recommendation

Introduction

Small project that uses the OpenAI API to obtain a recommendation on whether it is advisable to ask for a new card or stay. This is done by sending the player's current card point count and a list of the cards that are in the deck.

This is a simple example of how to use the OpenAI API to obtain recommendations based on a certaing context and conditions. The game is a simple blackjack game that was obtained from a Udemy course. The game is not the main focus of this project, but it is a good example of how to use the OpenAI API to obtain recommendations for a game.

Screenshot

blackjack-chatgpt-recommendation

Usage

  • Create a copy of the .env.dist file as .env and set your OpenAI API Key there.
  • Run the server with Node.js with: npm start
  • Open the web browser and go to http://localhost:3000
  • Play and when you need, press the button to request a recommendation from the AI.

Installation

  • Clone the repository with git@github.com:nachoaguirre/react-personal-resume-builder.git
  • Install the dependencies with npm install
  • Create a copy of the .env.dist file as .env and set your OpenAI API Key there.
  • Run the server with Node.js with: npm start
  • Open the web browser and go to http://localhost:3000

Technologies

Customization

You can customize the functionalities of the game by modifying the public/assets/js/game.js file. You can change the number of decks, and many other things.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

WTFLP-2.0.0

This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.å