Skip to main content
added 123 characters in body
Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26
  • Leo only knows Java, so your program must be executable via the Process API (command line), and use STDIN and STDOUT for input and output, respectively.
  • For each step of input and output detailed above, the input and output must each exist on one line.
  • There must be at least one trailing new line after the final output. (This is due to the way input is read from STDIN)
  • No extraneous input/output is allowed, other than trailing and leading spaces. The parser simply does not understand things like final_hand=... or draw 0.
  • When drawing, output is a single integer, when exchanging output is a list of integers and/or cards defined below, and when being dealt the original hand, output is a list of cards defined below.
  • All input/output numbers must be positive integers in base 10.
  • You may define the format for card input (see post format below).
  • True is defined as exactly "true," "1" or "t" and false is any other non-empty value.
  • During the exchange step:
    • Card indices must be output with at least one space between them (e.g. 3 4 0)
    • Card names must be output with at least one space between them (e.g. H4 S8)
    • Card names and indices may be mixed in the output (e.g. 0 H7 3 D3)
    • Trailing and leading spaces are allowed.
    • The input as a result of the player outputting the above will be formatted as specified by the bot.jlsc file, in the same order as requested
  • The number of cards a player wants to add to their hand can have leading and trailing spaces.
  • Hands must be output with at least one space between them (e.g. H4 D5 CA), trailing spaces and leading spaces are allowed.
  • Hands do not need to be output in proper order (e.g. H4 D4 C4 DA SA and H4 DA D4 SA C4 both represent 4, 4, 4, Ace, Ace, which is a full house).
  • If you wish to build a strategy by analyzing opponents hands, you may store data in a <botname>/data directory.
    • After competing bots have displayed their hands, they will be written to every bots data directory, in hands.txt, with each hand on a new line (separated by \n). The file will be encoded in US_ASCII.
  • After your bot requests new cards or exchange cards, the cards will be input depending on what format you specify in the bot.jlsc file.
  • Leo only knows Java, so your program must be executable via the Process API (command line), and use STDIN and STDOUT for input and output, respectively.
  • For each step of input and output detailed above, the input and output must each exist on one line.
  • No extraneous input/output is allowed, other than trailing and leading spaces. The parser simply does not understand things like final_hand=... or draw 0.
  • When drawing, output is a single integer, when exchanging output is a list of integers and/or cards defined below, and when being dealt the original hand, output is a list of cards defined below.
  • All input/output numbers must be positive integers in base 10.
  • You may define the format for card input (see post format below).
  • True is defined as exactly "true," "1" or "t" and false is any other non-empty value.
  • During the exchange step:
    • Card indices must be output with at least one space between them (e.g. 3 4 0)
    • Card names must be output with at least one space between them (e.g. H4 S8)
    • Card names and indices may be mixed in the output (e.g. 0 H7 3 D3)
    • Trailing and leading spaces are allowed.
    • The input as a result of the player outputting the above will be formatted as specified by the bot.jlsc file, in the same order as requested
  • The number of cards a player wants to add to their hand can have leading and trailing spaces.
  • Hands must be output with at least one space between them (e.g. H4 D5 CA), trailing spaces and leading spaces are allowed.
  • Hands do not need to be output in proper order (e.g. H4 D4 C4 DA SA and H4 DA D4 SA C4 both represent 4, 4, 4, Ace, Ace, which is a full house).
  • If you wish to build a strategy by analyzing opponents hands, you may store data in a <botname>/data directory.
    • After competing bots have displayed their hands, they will be written to every bots data directory, in hands.txt, with each hand on a new line (separated by \n). The file will be encoded in US_ASCII.
  • After your bot requests new cards or exchange cards, the cards will be input depending on what format you specify in the bot.jlsc file.
  • Leo only knows Java, so your program must be executable via the Process API (command line), and use STDIN and STDOUT for input and output, respectively.
  • For each step of input and output detailed above, the input and output must each exist on one line.
  • There must be at least one trailing new line after the final output. (This is due to the way input is read from STDIN)
  • No extraneous input/output is allowed, other than trailing and leading spaces. The parser simply does not understand things like final_hand=... or draw 0.
  • When drawing, output is a single integer, when exchanging output is a list of integers and/or cards defined below, and when being dealt the original hand, output is a list of cards defined below.
  • All input/output numbers must be positive integers in base 10.
  • You may define the format for card input (see post format below).
  • True is defined as exactly "true," "1" or "t" and false is any other non-empty value.
  • During the exchange step:
    • Card indices must be output with at least one space between them (e.g. 3 4 0)
    • Card names must be output with at least one space between them (e.g. H4 S8)
    • Card names and indices may be mixed in the output (e.g. 0 H7 3 D3)
    • Trailing and leading spaces are allowed.
    • The input as a result of the player outputting the above will be formatted as specified by the bot.jlsc file, in the same order as requested
  • The number of cards a player wants to add to their hand can have leading and trailing spaces.
  • Hands must be output with at least one space between them (e.g. H4 D5 CA), trailing spaces and leading spaces are allowed.
  • Hands do not need to be output in proper order (e.g. H4 D4 C4 DA SA and H4 DA D4 SA C4 both represent 4, 4, 4, Ace, Ace, which is a full house).
  • If you wish to build a strategy by analyzing opponents hands, you may store data in a <botname>/data directory.
    • After competing bots have displayed their hands, they will be written to every bots data directory, in hands.txt, with each hand on a new line (separated by \n). The file will be encoded in US_ASCII.
  • After your bot requests new cards or exchange cards, the cards will be input depending on what format you specify in the bot.jlsc file.
added 371 characters in body
Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26
  • Tournaments will be run when I get the time (my schedule is nearly as packed as Leo's, so this my be a little infrequent. Sorry for the inconvenience.).
  • Bots will be pit against eachother in 4 person games, and there will be one game for each possible subset of bots (i.e. lots of games).
    • This process will be repeated five times.
    • Due to the way the tournament handler makes the groups of bots, up to three filler bots will be added to make the number of bots divisible by 4. These bots will simply return the hand they were originally dealt. They also are listed with a byte count of one million, so they shouldn't ever have a place higher than last.
  • After every round and game is run, the scores of the bots will be computed using the bytes listed in their config, and their place inbased on the gamenumber games they won.
    • Multiple bots can share a position, in which case a tie is broken by byte count. If a tie persists, we have two winners and you'll have to deal with it (but the older answer will be acceptedties for first won by first posted).
  • After a tournament finishes, the scores will be appended to the bottom of this post.

###LeoBot Leo's bot is pretty smart. It doesn't exchange any cards, that's too hard, but it does request the maximum number of additional cards, and it determines the best possible hand it can make, and plays that hand. Unfortunately, due to OOP, Leo's bot has an absolutely insane byte count, so even if it wins every tournament, it's byte count will probably make it one of the lowest ranking bots. The main logic of leobot is below.

Note that if LeoBot consistently wins the tournaments, and there are a good amount of entries, I'll stop including him in the running.

  • Tournaments will be run when I get the time (my schedule is nearly as packed as Leo's, so this my be a little infrequent. Sorry for the inconvenience.).
  • Bots will be pit against eachother in 4 person games, and there will be one game for each possible subset of bots (i.e. lots of games).
    • This process will be repeated five times.
    • Due to the way the tournament handler makes the groups of bots, up to three filler bots will be added to make the number of bots divisible by 4. These bots will simply return the hand they were originally dealt. They also are listed with a byte count of one million, so they shouldn't ever have a place higher than last.
  • After every round and game is run, the scores of the bots will be computed using the bytes listed in their config, and their place in the game.
    • Multiple bots can share a position, in which case a tie is broken by byte count. If a tie persists, we have two winners and you'll have to deal with it (but the older answer will be accepted).
  • After a tournament finishes, the scores will be appended to the bottom of this post.

###LeoBot Leo's bot is pretty smart. It doesn't exchange any cards, that's too hard, but it does request the maximum number of additional cards, and it determines the best possible hand it can make, and plays that hand. Unfortunately, due to OOP, Leo's bot has an absolutely insane byte count, so even if it wins every tournament, it's byte count will probably make it one of the lowest ranking bots. The main logic of leobot is below.

Note that if LeoBot consistently wins the tournaments, I'll stop including him in the running.

  • Tournaments will be run when I get the time (my schedule is nearly as packed as Leo's, so this my be a little infrequent. Sorry for the inconvenience.).
  • Bots will be pit against eachother in 4 person games, and there will be one game for each possible subset of bots (i.e. lots of games).
    • This process will be repeated five times.
    • Due to the way the tournament handler makes the groups of bots, up to three filler bots will be added to make the number of bots divisible by 4. These bots will simply return the hand they were originally dealt.
  • After every round and game is run, the scores of the bots will be computed based on the number games they won.
    • Multiple bots can share a position (ties for first won by first posted).
  • After a tournament finishes, the scores will be appended to the bottom of this post.

###LeoBot Leo's bot is pretty smart. It doesn't exchange any cards, that's too hard, but it does request the maximum number of additional cards, and it determines the best possible hand it can make, and plays that hand. The main logic of leobot is below.

Note that if LeoBot consistently wins the tournaments, and there are a good amount of entries, I'll stop including him in the running.

added 371 characters in body
Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26
  • Exactly (case-sensitive) "true" "1" or "t" if the player wishes to exchange cards, any other non-empty output otherwise.
  • If true, list of indices of cards and/or card names the player wishes to exchange.
  • A single number between 0 and 3, which specifies how many additional cards the player wants.
  • Print out the hand the player wishes to use.
  • Since pokerface is a text-based adventure game, cards must be presented in a consistent way. Cards are represented by two character codes, the first character is the suit, and the second is the indexname of the card in base sixteen.
  • Cards:
    • 2-9 = 2-9
    • 10 = T
    • Jack = J
    • Queen = Q
    • King = K
    • Ace = A
  • Suits:
    • Spades = S
    • Clubs = C
    • Hearts = H
    • Diamond = D
  • Leo only knows Java, so your program must be executable via the Process API (command line), and use STDIN and STDOUT for input and output, respectively.
  • For each step of input and output detailed above, the input and output must each exist on one line.
  • No extraneous input/output is allowed, other than trailing and leading spaces. The parser simply does not understand things like final_hand=... or draw 0. 
  • When drawing, output is a single integer, when exchanging output is a list of integers and/or cards defined below, and when being dealt the original hand, output is a list of cards defined below.
  • All input/output numbers must be positive integers in base 10.
  • You may define the format for card input (see post format below).
  • True is defined as exactly "true," "1" or "t" and false is any other non-empty value.
  • Card indices must be output with at least one space between them (e.g. 3 4 0), trailing and leading spaces are allowed.During the exchange step:
    • Card indices must be output with at least one space between them (e.g. 3 4 0)
    • Card names must be output with at least one space between them (e.g. H4 S8)
    • Card names and indices may be mixed in the output (e.g. 0 H7 3 D3)
    • Trailing and leading spaces are allowed.
    • The input as a result of the player outputting the above will be formatted as specified by the bot.jlsc file, in the same order as requested
  • The number of cards a playingplayer wants to add to their hand can have leading and trailing spaces.
  • Hands must be output with at least one space between them (e.g. H4 D5 CA), trailing spaces and leading spaces are allowed.
  • Hands do not need to be output in proper order (e.g. H4 D4 C4 DA SA and H4 DA D4 SA C4 both represent 4, 4, 4, Ace, Ace, which is a full house).
  • If you wish to build a strategy by analyzing opponents hands, you may store data in a <botname>/data directory.
    • After competing bots have displayed their hands, they will be written to every bots data directory, in hands.txt, with each hand on a new line (separated by \n). The file will be encoded in US_ASCII.
  • After your bot requests new cards or exchange cards, the cards will be input depending on what format you specify in the bot.jlsc file.
  • Exactly (case-sensitive) "true" "1" or "t" if the player wishes to exchange cards, any other non-empty output otherwise.
  • If true, list of indices of cards the player wishes to exchange.
  • A single number between 0 and 3, which specifies how many additional cards the player wants.
  • Print out the hand the player wishes to use.
  • Since pokerface is a text-based adventure game, cards must be presented in a consistent way. Cards are represented by two character codes, the first character is the suit, and the second is the index of the card in base sixteen.
  • Cards:
    • 2-9 = 2-9
    • 10 = T
    • Jack = J
    • Queen = Q
    • King = K
    • Ace = A
  • Suits:
    • Spades = S
    • Clubs = C
    • Hearts = H
    • Diamond = D
  • Leo only knows Java, so your program must be executable via the Process API (command line), and use STDIN and STDOUT for input and output, respectively.
  • For each step of input and output detailed above, the input and output must each exist on one line.
  • No extraneous input is allowed, other than trailing and leading spaces. The parser simply does not understand things like final_hand=... or draw 0. When drawing, output is a single integer, when exchanging output is a list of integers defined below, and when being dealt the original hand, output is a list of cards defined below.
  • All input/output numbers must be positive integers in base 10.
  • You may define the format for card input (see post format below).
  • True is defined as exactly "true," "1" or "t" and false is any other non-empty value.
  • Card indices must be output with at least one space between them (e.g. 3 4 0), trailing and leading spaces are allowed.
  • The number of cards a playing wants to add to their hand can have leading and trailing spaces.
  • Hands must be output with at least one space between them (e.g. H4 D5 CA), trailing spaces and leading spaces are allowed.
  • Hands do not need to be output in proper order (e.g. H4 D4 C4 DA SA and H4 DA D4 SA C4 both represent 4, 4, 4, Ace, Ace, which is a full house).
  • If you wish to build a strategy by analyzing opponents hands, you may store data in a <botname>/data directory.
    • After competing bots have displayed their hands, they will be written to every bots data directory, in hands.txt, with each hand on a new line (separated by \n). The file will be encoded in US_ASCII.
  • After your bot requests new cards or exchange cards, the cards will be input depending on what format you specify in the bot.jlsc file.
  • Exactly (case-sensitive) "true" "1" or "t" if the player wishes to exchange cards, any other non-empty output otherwise.
  • If true, list of indices of cards and/or card names the player wishes to exchange.
  • A single number between 0 and 3, which specifies how many additional cards the player wants.
  • Print out the hand the player wishes to use.
  • Since pokerface is a text-based adventure game, cards must be presented in a consistent way. Cards are represented by two character codes, the first character is the suit, and the second is the name of the card.
  • Cards:
    • 2-9 = 2-9
    • 10 = T
    • Jack = J
    • Queen = Q
    • King = K
    • Ace = A
  • Suits:
    • Spades = S
    • Clubs = C
    • Hearts = H
    • Diamond = D
  • Leo only knows Java, so your program must be executable via the Process API (command line), and use STDIN and STDOUT for input and output, respectively.
  • For each step of input and output detailed above, the input and output must each exist on one line.
  • No extraneous input/output is allowed, other than trailing and leading spaces. The parser simply does not understand things like final_hand=... or draw 0. 
  • When drawing, output is a single integer, when exchanging output is a list of integers and/or cards defined below, and when being dealt the original hand, output is a list of cards defined below.
  • All input/output numbers must be positive integers in base 10.
  • You may define the format for card input (see post format below).
  • True is defined as exactly "true," "1" or "t" and false is any other non-empty value.
  • During the exchange step:
    • Card indices must be output with at least one space between them (e.g. 3 4 0)
    • Card names must be output with at least one space between them (e.g. H4 S8)
    • Card names and indices may be mixed in the output (e.g. 0 H7 3 D3)
    • Trailing and leading spaces are allowed.
    • The input as a result of the player outputting the above will be formatted as specified by the bot.jlsc file, in the same order as requested
  • The number of cards a player wants to add to their hand can have leading and trailing spaces.
  • Hands must be output with at least one space between them (e.g. H4 D5 CA), trailing spaces and leading spaces are allowed.
  • Hands do not need to be output in proper order (e.g. H4 D4 C4 DA SA and H4 DA D4 SA C4 both represent 4, 4, 4, Ace, Ace, which is a full house).
  • If you wish to build a strategy by analyzing opponents hands, you may store data in a <botname>/data directory.
    • After competing bots have displayed their hands, they will be written to every bots data directory, in hands.txt, with each hand on a new line (separated by \n). The file will be encoded in US_ASCII.
  • After your bot requests new cards or exchange cards, the cards will be input depending on what format you specify in the bot.jlsc file.
added 37 characters in body
Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26
Loading
added 37 characters in body
Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26
Loading
added 169 characters in body
Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26
Loading
deleted 75 characters in body
Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26
Loading
Tweeted twitter.com/StackCodeGolf/status/759002651488980992
Clarified true def.
Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26
Loading
Fixed some typos. Added many periods (use them please) and fixed a few other grammatical errors.
Source Link
R. Kap
  • 4.9k
  • 2
  • 15
  • 37
Loading
added 2 characters in body
Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26
Loading
added 186 characters in body; deleted 159 characters in body; added 178 characters in body
Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26
Loading
added 98 characters in body
Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26
Loading
deleted 270 characters in body
Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26
Loading
edited tags
Link
DJMcMayhem
  • 59.6k
  • 17
  • 196
  • 348
Loading
edited tags
Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26
Loading
Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26
Loading