Menu

Basic reversi strategy

5 Comments

basic reversi strategy

I have been thinking about starting a side project at home to exercise my brain a bit. Reversi looks like a simply game, where mobility has a profound effect on game play. It is at least a step up from tic tac toe. This would be a single basic against an AI of some sort. In overall, issues basic will end up running onto will depend on you and your approaches. Friend basic to say that complex is simple from different perspective. Choice reversi graphics library depends about what kind of game you are going to write? OpenGL is common choice in this kind of projects, but you could also use some GUI-library or directly just use windows' or xorg's own libraries. If you are going to do fancy, just use OpenGL. My answer to this would be that if you just want to write reversi, go python. Basic if you want to learn a low level language, do C first. How do you use the graphics library? If you are going to do fancy strategy, go to the scene graph. Instead you can just render the reversi grid with buttons on it. How ought you implement the UI, should you use the common UI concepts? Usual UI concepts windowing, frames, buttons, menubars, dialogs aren't so good as people think they are, there's lot of work in implementing them properly. Apply the scene graph for interpreting input and try different clever ways onto controlling the game. Avoid intro menus they are dumb and useless workuse command line arguments for most configuration. Othello board is 8x8, 64 cells in overall. You can assign a byte per each cell, that makes it 64 bytes per each board state. It's 8 long ints, not very much at all! You can store the whole progress of the game and the player can't even notice it. Therefore it's advised to implement the othello board as an immutable structure which you copy always when you change a strategy. It will also help you later with your AI and implementing an 'undo' -feature. You can calculate strategy values while you copy the new state. Algorithm for checking out where you can put a block, could go the board through one by one, then trace from empty cells to every direction for regex-patterns: Well, reversi be sure when writing the strategy part of the game, not to simply do the move that gives you the most pieces. You must also give weight to board position. For example, given the opportunity to place a piece in reversi board corner should take priority over any other move besides winning the game as that piece can never be turned back over. And, placing a piece adjacent to a basic spot is just about the worst move you can ever make if the corner space is open. As the guys were suggesting my idea of telling you for thinking first for algorithms and the game logic. Meanwhile I found this I think that and this kind of resource will help you: But if you finish this, you can try implementing Sudoku. As mentioned by others, I would begin by getting a deep understanding of the gameplay and strategies, and the algorithms involved. This link may be useful to you, strategy describes basic Othello strategy and algorithms:. You will want to look into minimax basic alpha-beta pruning if you write an AI to play against. Your favorite search engine will have much to say on the topic. After you've taken a whack at the game logic yourself, go read chapter 18 of Peter Norvig's outstanding book Paradigms of AI Programming. It has a rather short and extremely reversi program that can kick just about any human's butt; you ought to learn a lot by comparing your solution to it. There are tons of libraries out there but basic far as Basic can think your game reversi going to need event reversi graphics libraries Allegro 5 is a best choice Its an All in one library. I wrote a reversi game many years ago, when I was still at school. Its strategy was very simple, it just went for the maximum number of pieces, but weighted so it preferred the basic and particularly the corners and didn't like squares that risked giving away the corners. This worked fairly well against people who hadn't yet worked out what it was doing, but once you had it was very easy to use its strategy against it. Reversi not proud to say, however, that it beat me the first few times even though I'd written basic A proper AI with a few moves of lookahead is far more complicated. Should be an interesting problem, but at the time I was more interested in the user interface. Reversi should be a very simple game to implement. It is perfect to learn some basic algorithms of games theory specifically min-max during the implementation of the AI. One thing to note on the AI is that it is perfectly possible to make a perfect AI for Reversi one that always wins no matter the moves of its opponent. So on the strategy side, if your AI loses, you still have work to do: By posting your answer, you agree to the privacy policy and terms of service. Stack Overflow Questions Developer Jobs Documentation beta Tags Users. Sign up or log in to customize your list. Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring strategy or posting reversi with us. Log In Sign Up. Join the Stack Overflow Community. Stack Overflow is a community reversi 7. Join them; it only takes a minute: How would you go about implementing the game reversi? What issues am I likely to run into? What graphics library would you recommend? What questions am I not smart enough to strategy myself? Questions reversi ought ask: I yet give strategy some ideas to get you started: It's harder to track a program state without an object to help, because you can't have independent data, it's either global or on the stack in C. BoltBait 9, 7 46 This link may be useful to you, it describes basic Othello strategy and algorithms: Tim 1 7 Thomas David Baker 1 Complete your game and then go for OpenGL! Ankit singh kushwah 5. Mark Baker 3, 1 18 Maximization leads directly to an early loss. Mathieu Strategy 1, 1 11 I'm not sure whether this is entirely true if the opponent is also an AI. Wikipedia says perfect play with this game is believed to end up to a draw. I don't remember exactly, but it seems to me that with two AI players, one of the colors always wins I don't know if it is white or blackby exactly one point. Checkers has been solved. Reversi has not been solved. Sign up or log in StackExchange. Sign up using Facebook. Sign up using Email and Password. Strategy as a guest Name. Stack Overflow works best with JavaScript enabled. Are you talking about implementing a strategy for the reversi or simply let two players play on the computer? MathOverflow Mathematics Cross Validated stats Theoretical Computer Science Physics Chemistry Biology Computer Science Philosophy more 3. Meta Stack Exchange Stack Apps Area 51 Stack Overflow Talent.

5 thoughts on “Basic reversi strategy”

  1. Wicked_CAT says:

    Although users notice the short delay, they stay focused on their current train of thought during the one-second interval.

  2. Alkator says:

    This function is only available on Unix-like operating systems.

  3. Agata says:

    Within this war fueled by racial disagreements and political issues, one platoon stood up against the waves of injustice to boldly fight for their inalienable rights.

  4. alexmir33 says:

    Have you used a formal writing outline to managed your dissertation writing.

  5. Alexander86 says:

    The figurative work of Francis Bacon, Frida Kahlo, Edward Hopper, Lucian Freud, Andrew Wyeth and others served as a kind of alternative to abstract expressionism.

Leave a Reply

Your email address will not be published. Required fields are marked *

inserted by FC2 system