Notices


Reply
Thread Tools
ndi's Avatar
Posts: 2,050 | Thanked: 1,425 times | Joined on Dec 2009 @ Bucharest
#11
Well, I'm out of town now, but as soon as I get back.

New version still cheats, but good news is so do I. I let the computer take a line and after a few iagonal plays I got those too.

Anyway, my basic algo is based on a 8x8 board, each one has a "value", with center being zero and corners being 100. This allows prioritising play. This is level one.

At level two, game tries to play all his valid moves, then all my next moves. Once this is done, it sorts solutions by the most advatageous move. E.g., if a play of his will open me to take a corner, that solution get him -100, because it loses the hundred peg.

This allows it to not play moves that allow me to get corners, unless it's the last move.

The higher the level, the more it tries to predict.

With enough heuristcs, it will become a war of limitation of damage. As a result, and ideal player will exhaust my safe moves before I exhaust his, evntually forcing me to play a 22 27 72 or 77, meaning he gets corners.

Because of value grid, it will first try to get a foothold on lines, the semicorners, then corners. A few exceptions apply, such as black 13 14, white 15, his move. This should be a 99 move for 12, not because of position, but because it kicks me off the line.

Another exception is black 13 15, if it can it should take 14. Because if I ever play up to 12 or 17, it's his corners and his line.

Once it predicts the whole game and has a complete list of exception, I'll pit it against my algo and, if it beats that, me.

Standard N900 post disclamer.
__________________
N900 dead and Nokia no longer replaces them. Thanks for all the fish.

Keep the forums clean: use "Thanks" button instead of the thank you post.
 

The Following User Says Thank You to ndi For This Useful Post:
Posts: 1,994 | Thanked: 3,342 times | Joined on Jun 2010 @ N900: Battery low. N950: torx 4 re-used once and fine; SIM port torn apart
#12
Originally Posted by mmlado View Post
I like that you like it. One happy user. Mission accomplished. Thank you. Yes the comp cheats. I hope the bug is fixed. Please upgrade the app.



This one is fixed in the new version, too. I forgot to reset the players.
Upgraded!
Not fixed yet. Screenshot number one.


Originally Posted by mmlado View Post
I didn't encounter this problem yet. I would be grateful if you could make a screenshot of this problem maybe it would help.
I'm planing on implementing a save function, which would save the history of moves, so I can replicate the game.
In any case I'll try to find and fix it.
It seems I don't encounter it now. More testing needed...
Screenshow two: rigorous testing.

Originally Posted by mmlado View Post
Thank you. There are plans to make it more aesthetically pleasing, by adding colors, and making the disks flip.
Not necessary. You will have to implement options: whether to show flip, whether to add colours...

Originally Posted by mmlado View Post
Sure. I have many plans for PeQersi. For now, for me, it was important to make the basics, and make it playable. I wanted this to enter the competition and gain exposure for the app, and hopefully a bigger user base, then when released without the competition.
Thank you again for this wonderful application!

Originally Posted by mmlado View Post
It's a guesser, for now. My next step will be to create an script that will grab the most possible disks and probably add a little randomness to it, so it doesn't play the same way always. Hopefully with the help of ndi, a real ai will be written for it.
Then not surprising that a human can sometimes win against it.

Originally Posted by mmlado View Post
Yes. The first two are there because I wanted them. The first says if it's on a maemo or another comp type, and runs some additional lines in the script. The script can utilize the OpenGL acceleration, for the eye candy later development. In this case it tells it's disabled. I left out the library from dependencies, but if you have it installed it will be used.
I'm hunting for the third message.
It's still here...

Originally Posted by mmlado View Post
It will be added, will have to learn how, and probably modify the script a little.
It's not important.

Originally Posted by mmlado View Post
Manny things are in plan, and I'll add new things as I can. For the duration of the competition development is freezes, only bug-fixes allowed.
Looking forward with hope.

Originally Posted by mmlado View Post
If you like it, please vote here: http://talk.maemo.org/showthread.php?t=58990
I have, already.


P.S. Cheating or not, but an improbable first move.
In screenshot three.
Attached Images
   
 

The Following User Says Thank You to Wikiwide For This Useful Post:
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#13
Originally Posted by mmlado View Post
Sorry. I have no idea what you're talking about. I don't play Reversi that much, I like the programing challenge it gives me.
For now it only finds current players disks and from them sees in which are possible moves and which disks will be taken over in the process. I would be grateful if you could show me in the direction where these algorithms can be found, or if you would be kind to explain it here on tmo, so others can learn too.
What you are looking for is called 'game tree algorithms', take a peek at

http://www.hamedahmadi.com/gametree/
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 

The Following 2 Users Say Thank You to attila77 For This Useful Post:
gryllida's Avatar
Posts: 52 | Thanked: 196 times | Joined on Jul 2010
#14
Originally Posted by Wikiwide View Post
1. Sometimes, after one game is finished, I click "New Game", it creates new field, but the count outside the field doesn't change, and I cannot make a single move, I have to restart the program.
Hi mmlado and Wikiwide. I'm having same issue here, 'new game' button works unstably. I ended up placing a launcher on desktop. After game finishes, I tap 'close' and then the launcher (same number of taps as top menu - new game). Suggest placing 'new game' button at right bottom. In general, good game, doesn't take too much or too little attention, isn't bringing the player to virtual world like many games do. ~~Gryllida
 

The Following 4 Users Say Thank You to gryllida For This Useful Post:
Posts: 193 | Thanked: 201 times | Joined on Dec 2009 @ Subotica, Serbia
#15
Originally Posted by gryllida View Post
Hi mmlado and Wikiwide. I'm having same issue here, 'new game' button works unstably. I ended up placing a launcher on desktop. After game finishes, I tap 'close' and then the launcher (same number of taps as top menu - new game). Suggest placing 'new game' button at right bottom. In general, good game, doesn't take too much or too little attention, isn't bringing the player to virtual world like many games do. ~~Gryllida
Thank you for the suggestion.
I think got the new game bug fixed. New version available through update. Please test it.
There are many things in the plans, but for now only bug fixes are allowed, because of the competition.
I'm developing in the meantime, and will release the changes next week.
 

The Following User Says Thank You to mmlado For This Useful Post:
Posts: 1,994 | Thanked: 3,342 times | Joined on Jun 2010 @ N900: Battery low. N950: torx 4 re-used once and fine; SIM port torn apart
#16
Testing for PeQersi version 2 (I'll soon update to version 3).

Sometimes it allows me to make an "impossible" first move.

When 0 white pebbles are left, it doesn't notice that I have won.

When there is a draw (32-32), it says I lost.
Attached Images
   
 

The Following 2 Users Say Thank You to Wikiwide For This Useful Post:
Posts: 193 | Thanked: 201 times | Joined on Dec 2009 @ Subotica, Serbia
#17
Originally Posted by Wikiwide View Post
Testing for PeQersi version 2 (I'll soon update to version 3).

Sometimes it allows me to make an "impossible" first move.

When 0 white pebbles are left, it doesn't notice that I have won.

When there is a draw (32-32), it says I lost.
Thank you for the bug reports.
Fixed them.

I've added some new things too, but those will wait, for the upload, till the competition ends.
 

The Following User Says Thank You to mmlado For This Useful Post:
Posts: 249 | Thanked: 167 times | Joined on Mar 2010 @ International
#18
@mmlado

I am a big reversi fan, so thank you for this offering!

I also realise that in some instances, it is still a work in progress and would ask that you look at the following areas.

1. The program does not offer a win/lose result when the game is over and there is a cell/square still open.

2. Is it possible to add different challenge/difficulty levels? It is way to easy at the moment.

3. Is it possible to add a running total of game stats such as games won/lost/drawn?

All this being said, i really enjoy your program and spend at least an hour a day playing. It has save my sanity at the airports while waiting for my flights.

Thank you once again for your effort.
__________________
How to ask questions the smart way
He who smiles in a crisis has found someone to blame.
Shirts get dirty. Underwear gets dirty. Pants? Pants never get dirty, and you can wear them forever.
My Favourite posts!
http://talk.maemo.org/showpost.php?p...&postcount=539
http://forums.precentral.net/2674180-post149.html
http://talk.maemo.org/showpost.php?p...&postcount=500
http://talk.maemo.org/showthread.php?t=63720
 

The Following 2 Users Say Thank You to gryedouge For This Useful Post:
Posts: 193 | Thanked: 201 times | Joined on Dec 2009 @ Subotica, Serbia
#19
I'm glad to hear you like and enjoy it
It's more of an experiment for me. I'm learning PyQt on this project.
Hopefully I'll upload the next version sometime during next week.

Originally Posted by gryedouge View Post
1. The program does not offer a win/lose result when the game is over and there is a cell/square still open.
I'll try to find this bug. It would be helpful, when it occurs, if you could take a screenshot and upload it here. Thank you in advance.

Originally Posted by gryedouge View Post
2. Is it possible to add different challenge/difficulty levels? It is way to easy at the moment.
Not yet. I've made a new AI, which choses the position which will flip the most of enemies disks. It is waiting for the rework of the interface for the update.
It is planed to change it so difficulty can be chosen.

Originally Posted by gryedouge View Post
3. Is it possible to add a running total of game stats such as games won/lost/drawn?
Sure. Thank you for the proposal.
__________________
Demine
PeQersi
 

The Following User Says Thank You to mmlado For This Useful Post:
Posts: 193 | Thanked: 201 times | Joined on Dec 2009 @ Subotica, Serbia
#20
New version (0.1.0) in the repository, grab it while it's hot.

Here's the changelog:
  • Computer AI added that will grab as many of opponents disks as possible
  • Dialog at the end of game gives more information and asks if the player wants a new game
  • Structure of interface modified to use one graphic scene

Hope you'll enjoy the added difficulty. It's still not the real thing, but it'll do for now.
Next I'll work on adding options dialog, so players can be changed, and some other things...
__________________
Demine
PeQersi

Last edited by mmlado; 2010-08-16 at 19:57.
 

The Following 3 Users Say Thank You to mmlado For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 23:12.