Code Monkey home page Code Monkey logo

Comments (7)

Scrivener07 avatar Scrivener07 commented on June 8, 2024 1

I like the idea of randomly selected personalities too. Its pretty bare bones at this point but Ive left a lot of room to expand this area in the future. The personalities are not interesting enough to close this issue so I guess leave it open until we have time to revisit this.

from fo4_games.

TheWhiteCollarPlayers avatar TheWhiteCollarPlayers commented on June 8, 2024

Where are we on this?

from fo4_games.

Scrivener07 avatar Scrivener07 commented on June 8, 2024

The personalities are already pretty much done. The human, and dealer already have unique personalities, the other bots do too. Its just the other bot need to be given an interesting unique personality.

The two bot personalities I have thought of so far are the Whale and the Swatter.

The whale will override the default wager behavior with one that will always wager the players bet times three and plus 50. They will always be the highest betting player at the table.

int Function BehaviorWager()
	return (BlackJack.Players.Human.Wager * 3) + 50
EndFunction

The swatter will override the default turn behavior with one that favors hitting for a new card. They really like to hit on their turn.

int Function BehaviorTurn()
	If (Score <= 18)
		return OptionHit
	Else
		return OptionStand
	EndIf
EndFunction

from fo4_games.

TheWhiteCollarPlayers avatar TheWhiteCollarPlayers commented on June 8, 2024

Nice! I like the idea of different personalities, how many of those were you thinking of doing? You could also do ones such as "the cheapskate" or "the conservative".

from fo4_games.

Scrivener07 avatar Scrivener07 commented on June 8, 2024

I want there to be 6 unique players counting the dealer and human. That's one player for each possible seat at a blackjack table. (1 dealer, 5 gamblers).

The base default Player class is a simple gambler AI with nothing special. It returns a hardcoded wager of 20 and will hit while their score is less than or equal to 16, stands on 17 or greater. With that, it is very simple to extend this Player base by overriding the functions involved in their behavior.

We have the following so far.

  • Dealer
  • Human
  • Bot Whale
  • Bot Swatter
  • Bot Default
  • Bot Default

If you count the default bot as a unique player then that leaves room for one more personality.
How exactly does a "cheapskate" or "conservative". play their game? What kind of decisions do they make?

This one might be more than I want to do right now but as an example consider the "card counter".

The card counter personality when deciding whether to hit or stand, may peek at the card they would draw if they were to hit. If it is safe to hit then they will.

The AI personalities may be something we can use to increase the difficulty of a game among other factors.

from fo4_games.

TheWhiteCollarPlayers avatar TheWhiteCollarPlayers commented on June 8, 2024

Card counter would be interesting, a cheap skate / conservative will always bet low amounts and take very few risks so he wont hit on higher cards and try to play it safe.

One idea later down the road could be to have many personalities with a random number generator assigning one of the many personalities to the different bots, so that you won't necessarily play with the same personality each time. Just some food for thought, haven't thought much about how the code for that would look.

from fo4_games.

TheWhiteCollarPlayers avatar TheWhiteCollarPlayers commented on June 8, 2024

Closing this as we have taken a different approach with blackjack, if we wish to pursue this later on, we can reopen

from fo4_games.

Related Issues (20)

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.