Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,449 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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