If you want something done...

Discussion on on-line and off-line mahjong softwares.

Moderator: Shirluban

WorTeX
Senior Reacher
Senior Reacher
Posts: 110
Joined: Sat Jan 17, 2009 9:36 am
Location: Finland

Re:If you want something done...

Post by WorTeX » Sun Mar 07, 2010 1:50 pm

I think game mechanics should be the first wall to climb, then graphics and tweaking. As long as there is a working mahjong game at the base, you can start adding variables of rules, tile sets etc. Keep up the good work :)

kylone
Fresh Reacher
Fresh Reacher
Posts: 31
Joined: Mon Aug 17, 2009 2:02 pm
Location: Lincoln, NE

Re:If you want something done...

Post by kylone » Sun Mar 07, 2010 5:56 pm

Start tackling the game itself first. Got it.

What I\'m thinking, for the AI, as far as big strategy, is two ways of evaluating the tiles in its hand: looking offensively, to complete the hand, and looking defensively, to try not to discard a winning tile.
Have it re-evaluate the hand after every discard, and its own draw, as each move can change the situation.

I\'m trying to keep the overall concept of the AI simple, and have the behavior emergent from simple decisions. (Kinda the same way ant follow simple rules, but to complex things)

kylone
Fresh Reacher
Fresh Reacher
Posts: 31
Joined: Mon Aug 17, 2009 2:02 pm
Location: Lincoln, NE

Re:If you want something done...

Post by kylone » Sun Mar 07, 2010 6:16 pm

Some general guidelines (remember, this are being re-evaluated as the game unfolds:
* if you\'re more than 4 away, play defensively
* if calling a tile would make you further away than you are right now, do not call it (this includes calling kon) (ties would be for a non-low level ai)
* if your hand is eligible for riichi, three things to consider 1) how far from the end of the wall, 2) likeliness of the current waits 3) how likely is it to add a yaku, or better waits (this may be somewhat simplified for the low level ai)

As for discarding, the AI would assign two weights (numbers) two each tile in hand: on offensive discard weight, and a defensive discard weight. Then double the importance of the weight of the way the AI has chosen to play (offensive or defensive).

As for being offensive or defensive, like I said above, if the hand needs more than 4 tiles to be in tempai, play defensive. If another player has declared riichi, and you\'re \"not close\", play defensive. If, after 10 turns, you are \"not close\", play defensive. Otherwise, play offensive.

User avatar
Shirluban
Moderator
Moderator
Posts: 780
Joined: Thu Jan 22, 2009 1:53 pm
Location: Svartalfheim
Contact:

Re:If you want something done...

Post by Shirluban » Sun Mar 07, 2010 6:25 pm

You also need to consider :
- online games with humans opponents
- language selection
- rule selection (variants and/or other rules)

Did you try your algorithm to seek tiles to tenpai?
Ensuring AI didn\'t claim a win with a noten or no-yaku hand and don\'t end in an infinite loop seems to me a lot harder than displaying a 3D tile with a framework designed for video games.
Try with this hand:
1-crak 1-crak 1-crak 1-crak 2-crak 2-crak 3-crak 3-crak 4-crak 5-crak 5-crak 6-crak 7-crak 8-crak

Or even scoring a hand?
It sounds easy, it is easy for a human, but not for a computer.
Cats don't do タンヤオ (tan-yao) but タニャーオ (ta-nya-o).
World Riichi Championship Rules 2022
Comparison of riichi rules around the world

kylone
Fresh Reacher
Fresh Reacher
Posts: 31
Joined: Mon Aug 17, 2009 2:02 pm
Location: Lincoln, NE

Re:If you want something done...

Post by kylone » Mon Mar 08, 2010 2:57 am

It\'s going to be a while for me to get that far. I\'m still in the planning stages. I\'m net even coding yet. Right now, I\'m working on the major classes of the game, and how they will work together. The algorithm stuff is pretty much from the top of my head...

I\'ll let you know when I have a bit more to show. ;P

User avatar
Barticle
Platinum Boarder
Platinum Boarder
Posts: 1556
Joined: Thu Apr 30, 2009 12:08 pm
Location: Ipswich, UK (and usually 一向聴地獄)
Contact:

Re:If you want something done...

Post by Barticle » Thu Mar 11, 2010 12:24 pm

Barticle wrote:Personally I\'d like absolutely tons of [...] rule options
I would like your game to have at least this many...! :silly:

http://kumot.finito.fc2.com/mj/ruleinput.html

Monadology
Fresh Reacher
Fresh Reacher
Posts: 30
Joined: Tue Apr 07, 2009 6:41 pm

Re:If you want something done...

Post by Monadology » Thu Mar 11, 2010 2:59 pm

You should leave the aids for accessibility to a tutorial or some other restricted mode I think. It\'s a great idea for getting players into the game, but they shouldn\'t be having their thinking done for them when they\'ve actually learned it.

I think that will ultimately bore them quicker and has a chance of stunting growth and creating a false sense of limitation when it comes to their reasoning about the moves they make.

Post Reply