Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About michael879

  • Rank
  1. michael879


    Is java a good language for programming games in? I know its easier, but its slow right? cristiansayys@aim.com
  2. michael879

    help with casino API

    yea my bad. I just need some help creating a qualitative outline for the API (i.e. the classes needed). Theres something wrong with my approach, Im just not sure exactly what it is or how to fix it..
  3. Im writing this casino API for a project Im working on and Im kind of stuck. My original layout was nice, but because each table can be either a tournament or a cash game, and because Java doesnt allow multiple inheritance, I had to add all these classes and am now pretty confused. Here is a brief overview of my classes: class Card Represents a basic playing card. Is immutable and has a suit and value. class CardList Represents a list of cards. Has several functions represents different actions. i.e. shuffle, draw. class Deck extends CardList Represents a deck of cards. Throws an exception if you try to look into a deck. Keeps track of dealt cards also. You can return all dealt cards to the deck. class Random Random class for the casino. Currently is just a wrapper for java.util.Random. class Member Represents a member of the casino. Keeps track of the total amount of money the player has, and what tables he is at. abstract class Table Represents a casino game table. Has an abstract run function which plays whatever game the table is for. Has a set number of seats. class Table.Seat Represents a table seat (obviously). Stores the player sitting down (null for no player). Also stores whether the player is sitting in or not, and is a node in two linked lists. One is for players sitting down, the other is for players sitting in. interface GameFactory Contains two functions for creating a new Player and a new Table. abstract class Game Represents a casino game (e.g. tournament, cash game). Members join games using the Game.join(Member) function. The game handles table, seat, and stack assignment. abstract class Game.Seat No clear representation. Players can sit in/sit out/leave through the abstract functions in this class. This class also keeps track of a players chipstack. abstract class Player Represents a casino game player. A new player is created whenever a member joins a game. Originally GameFactory, Game, and Game.Seat didnt exist. I had to add them though to allow for tournaments. Im having a lot of trouble describing what exactly the problem is, and I cant figure out how to fix it... Does anyone have any comments on this? Im sure I did awful job of explaining my problem, so all the code is available here: http://www.kruskal.net/casino/casino.zip
  4. michael879

    "hidden" data in C++

    yea honestly my design is kind of falling apart. This problem pretty much proves it doesnt it? I have a card_pile class which basically just represents a list of cards and has a bunch of functions for manipulating them (shuffling, drawing, etc). I have a class deck which inherits from card_pile. deck throws errors on certain read operations so that the only way you can read cards from a deck is to draw. However the only thing I could think to do with the hand class is to add protection from other players viewing private cards.
  5. michael879

    implementing time limits

    I dont think theres any fullproof way to do this without a server to keep track of this stuff. And then the person would need internet access to use the program. However all you would rly need to do is write the system date/time to disk when they enter the key, and check that against the system date/time whenever the program is run. However anywhere u write it they could change it. They could also just change their system date and time.
  6. ok although I know its impossible to hide data 100% in C++, I want to make it very difficult and awkward to read some data. Im making this card game library and I have hand and player classes. Each card in the hand has a list of players associated with it who can read it. player, and potentially hand, will have a subclass for each game implemented. I want to make it so that the children of player will be able to view only cards they are allowed to view. However since in C++ any instance of a class can view the private data of any other instance of that class, I dont see a good way to accomplish this. I did however think of one thing but Im not sure how well it will work. Its based on the fact that if a virtual super function is redefined by a child class then each instance can only call their super's function (by calling super::function). As far as I know there is no way to call another instance's super function (although there is in Java).
  7. michael879

    fast TD function approximation

    yea see I thought about all of that. First, while inputting probabilities about the hand rather then just the hand seems like a good idea, it has some drawbacks. The main one is that theres no good way to fully describe the state without inputting the entire hand, and having the neural net figure out how to process it. Yes, I could input the probability of getting each of the 7 different hand types, but that still isnt fully descriptive. I would rather allow the neural net to figure out how to process it on its own, instead of hardcoding it. Second, Ive thought about splitting it up in diffrent ways. Making a neural net to process different hands and another to find the expected gain from some game state seems like a good idea also. However, what would the first neural net output? It couldnt just output a rating for the hand because the specific board is used to determine possible hands for your opponents. Although these both seem like good ideas, I think it would make the final neural net inferior, and theres no good way to split up the tasks without taking out possible functionality. Finally, I havnt really decided on any design yet, the main point of this post was to see if there are any algorithms that are faster than the TD(lambda) neural net. Alrecenk, how is this not good for function approximation? This problem is PERFECT for function approximation. Yes, it would end up being very complex, and Id have to train many different nets in order to get one that converges to a good maxima, but I think function approximation is a good way to solve this.
  8. michael879

    retrieving data from a poker table

    well actually, I never actually followed through on this but online blackjack tables only use 2 decks and allow you to sit and up to 5 seats at once. It seems like the extra information of being able to view over 11 cards might be enough to push the odds in your favor (since theyre already very close). As for creating a poker bot, I doubt mine will be closed to perfect. However, I do expect it to pick up on certain strategies like bluffing, check raising, etc after enough training.
  9. michael879

    retrieving data from a poker table

    and another thing, computers can do plenty of things better than humans, including many games. Why would a computer that plays poker well even come close to passing the turing test? Also, my program will adapt also (since it uses neural nets it will even resemble human adaptation). If I allow it to train off real games, it will learn how to play against a wide variety of opponents.
  10. michael879

    retrieving data from a poker table

    youve obviously never played online poker. First of all, theres virtually no adapting required. If you have a strategy that takes into account your opponents playing skills (which can be based on raw stats about them) you can do fine. When I play, except for my tilted game, Im basically a machine. And I make decent money doing this. This would in no way pass the turing test. The programs only function is to play poker. True, it would probably do awful against any pro (although with a big enough neural net maybe not), but on a low limit table with a bunch of idiots, it should be able to make a lot of money. A simple learning algorithm should be more than capable of learning to play online poker. Maybe it would be limited to play at "low" stakes, but the player skill level doesnt significantly change until you get into $3-$6 limit. At 25-50 cent limit I was able to make a steady 5 dollars an hour per table. Also, so what if players adapt? Their adaptions can be modeled by statistics about their recent playing style. If you have a program that collect stats on players, and another than uses these stats along with pure odds to find the best actions, I dont see how it wouldnt work. Given enough time to train on a diverse enough training set, it should be able to learn the game better than most humans. Its impossible for the casino to lose money on a poker game.. they take a % of each pot. It could possibly be illegal, or morally questionable, since in a way I am taking advantage of the other players (although Im doing that normally anyway).
  11. michael879

    retrieving data from a poker table

    either way, my main goal is to write a program that plays poker "well". Thinking over the consequences of using it for my own financial gain, it would probably be best not to use it on any poker sites. If I were to make a lot of money, I would be committing tax evasion, illegal gambling, and possibly a few other laws. I do need to be able to have the program train off real games however. Although possible, I doubt the program can really fully learn to play just by playing itself. This is because playing itself would only teach it to do well against itself. Even if I have 1000 different versions all playing each other, they will still probably do better against themselves than against real players. So to fully train this program, I would need to at least let it observer real games. It would be possible to train it by just allowing it to watch me play and observe the outcomes of my actions.
  12. michael879

    retrieving data from a poker table

    well Ive managed to make close to $1000 off my initial $10 off low stakes poker using a pretty simple strategy. Like Oyster stated, the fact that they make insane calls makes it very profitable for you in the long run. I could probably write a simple enough program that just followed my strategy minus all the stupid on-tilt mistakes I make. However Im going for something more complicated. Could u possibly send me some more information on what you did? Besides the US anti-gambling laws, how is this illegal? Its not cheating, its not fraud, I dont see anything wrong with it. I emailed one of the poker sites asking them about it, but I dont see why writing your own poker client would be more illegal then using theirs. Morally, again I dont see much wrong with it. Theres nothing wrong with writing your own poker client program is there? Is there anything wrong with writing a program that tells you the best actions based on some player stats? Then why is there anything wrong with a program that just takes the best action rather than telling it to u? Unless you think gambling is morally wrong, I dont see why writing a program to gamble for you is.
  13. michael879

    fast TD function approximation

    na theres no way this function is linear. Even if I altered the inputs in a way that they required no real processing (which would end up being over 1000 inputs) Id be suprised if it were linear. The program is going to learn to play poker. Right now I have it setup to represent cards in either 1 or 2 inputs, with no real input about probable hands. That alone would probably require significant non-linear processing.
  14. michael879

    retrieving data from a poker table

    haha I know you cant get data on other peoples hands, not at any decent site at least, and even then youd have to hack their server. Thats a good idea tho, I never even considered going that route. That would probably be really easy to do, once I found out what port its on.. Im not sure how windows handles two applications listening on the same port however, is there something special I would have to do to be able to intercept packets without interfering?
  15. Im not sure if anyones familiar with this feature, but a lot of online poker software has it. The best example Ive seen is from http://www.calculatem.com/ I was wondering if anyone knew how they did this? Im working on a program that should eventually be capable of playing poker online, and Id like a way to automate it by having it retrieve its own input from the table.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!