Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,310 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
MahJong tile placement algorithm #210503
06/11/08 01:32
06/11/08 01:32
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline OP
User
DavidLancaster  Offline OP
User

Joined: Nov 2004
Posts: 862
Australia
Would anyone know of a website or something that has information about how to write a successful MahJong tile placement algoritm? ie tell a computer how to place tiles on a board so that there is always at least 1 possible solution. I'm stumped how to do it, I keep running into small niches in my head.

Thank you!

David

Re: MahJong tile placement algorithm [Re: DavidLancaster] #212547
06/22/08 23:05
06/22/08 23:05
Joined: May 2006
Posts: 90
England
TigerTao Offline
Junior Member
TigerTao  Offline
Junior Member

Joined: May 2006
Posts: 90
England
I think this problem is a huge can of worms smile

I found this site

http://home.halden.net/vkp/vkp/layouts.html

It seems you can either go the random route(often unwinnable)or set up many predefined patterns with no algorithm(always winnable).

This though may help

http://www.formauri.es/personal/pgimeno/mj/mjsol.html

Hope this clears up the nature of your problem.

Last edited by TigerTao; 06/22/08 23:07.
Re: MahJong tile placement algorithm [Re: TigerTao] #212759
06/24/08 02:26
06/24/08 02:26
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline OP
User
DavidLancaster  Offline OP
User

Joined: Nov 2004
Posts: 862
Australia
Thanks Tiger.

I managed to get an algoritm working with tiles that were only on either even or odd rows on a layer. ie if the bottom of a tile met the halfway point of another it introduces another complication. As when I place the tiles I need to make sure that I'm doing two things:

-place the tile in a location that is available
-place the tile in a location that doesn't block it's pair tile

I managed to get solutions working for certain layouts but it's really difficult to come up with an algorithm that works for all layouts.

Kyodai Mahjong somehow does it brilliantly. I think smile

Last edited by DavidLancaster; 06/24/08 02:30.

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1