A discussion about possible algorithms which solve the 2048 game arose on StackOverflow.
The main discussed algorithms are:
The solution I propose is very simple and easy to implement. Although, it has reached the score of 131040. Several benchmarks of the algorithm performances are presented.
This intuition will give you also the upper bound for a tile value: $2^{n} \rightarrow 2^{16} = 65536$ where $n$ is the number of tile on the board. (There's a possibility to reach the 131072 tile if the 4-tile is randomly generated instead of the 2-tile when needed)
Two possible ways of organizing the board are shown in the following images
To enforce the ordination of the tiles in a monotonic decreasing order, the score si computed as the sum of the linearized values on the board multiplied by the values of a geometric sequence with common ratio $r<1$ .
Several linear path could be evaluated at once, the final score will be the maximum score of any path.
An implementation of the minmax or the Expectiminimax will surely improve the algorithm. Obviously a more
sophisticated decision rule will slow down the algorithm and it will require some time to be implemented.I will try a minimax implementation in the near future. (stay tuned)
In case of T2, four tests in ten generate the 4096 tile with an average score of $\sim 42000$
- https://github.com/ov3y/2048-AI (ovolve)- A minimax approach which take into account several heuristic functions - I tested it out and it turned out to have some problems in reaching the 4098 tile in a reliable way
- https://github.com/nneonneo/2048-ai (nneonneo)- A very efficient implementation of an Expectiminimax approach with a quite simple heuristic - AFAIK he has reached the highest score of 173364 but I have not tried it yet
The solution I propose is very simple and easy to implement. Although, it has reached the score of 131040. Several benchmarks of the algorithm performances are presented.
Algorithm
Heuristic scoring algorithm
The assumption on which my algorithm is based is rather simple: if you want to achieve higher score, the board must be kept as tidy as possible. In particular, the optimal setup is given by a linear and monotonic decreasing order of the tile values.This intuition will give you also the upper bound for a tile value: $2^{n} \rightarrow 2^{16} = 65536$ where $n$ is the number of tile on the board. (There's a possibility to reach the 131072 tile if the 4-tile is randomly generated instead of the 2-tile when needed)
Two possible ways of organizing the board are shown in the following images
To enforce the ordination of the tiles in a monotonic decreasing order, the score si computed as the sum of the linearized values on the board multiplied by the values of a geometric sequence with common ratio $r<1$ .
$p_n \in Path_{0 \cdots N-1}$
$score = \sum_{n=0}^{N-1} value(p_n) * r^n$
Several linear path could be evaluated at once, the final score will be the maximum score of any path.
Decision rule
The decision rule implemented is not quite smart, the code in Python is presented here:An implementation of the minmax or the Expectiminimax will surely improve the algorithm. Obviously a more
sophisticated decision rule will slow down the algorithm and it will require some time to be implemented.I will try a minimax implementation in the near future. (stay tuned)
Benchmark
- T1 - 121 tests - 8 different paths - $r = 0.125$
- T2 - 122 tests - 8-different paths - $r = 0.25$
- T3 - 132 tests - 8-different paths - $r = 0.5$
- T4 - 211 tests - 2-different paths - $r = 0.125$
- T5 - 274 tests - 2-different paths - $r = 0.25$
- T6 - 211 tests - 2-different paths - $r = 0.5$
In case of T2, four tests in ten generate the 4096 tile with an average score of $\sim 42000$
Code
The code can be found on GiHub at the following link: https://github.com/Nicola17/term2048-AI
It is based on term2048 and it's written in Python. I will implement a more efficient version in C++ as soon as possible.
It is based on term2048 and it's written in Python. I will implement a more efficient version in C++ as soon as possible.
StackOverflow
You can upvote my answer on StackOverflow here :)
2048 cupcakes reverse game is a alteration of 2048 game designed and developed by Italian Programmer.
ReplyDeleteGreat Article Artificial Intelligence Projects
DeleteProject Center in Chennai
JavaScript Training in Chennai
JavaScript Training in Chennai Project Centers in Chennai
Attend The Artificial Intelligence course From ExcelR. Practical Artificial Intelligence course Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Artificial Intelligence course.
ReplyDeleteArtificial Intelligence course
Really Great Post & Thanks for sharing.
ReplyDeleteOflox Is The Best Website Design Company In Dehradun
kunkumadi face Oil
ReplyDeleteB Best Hair Oil
wheatgrass powder
B on
Balu Herbals
Excellent! I love to post a comment that "The content of your post is awesome" Great work!
ReplyDeletedigital marketing courses mumbai
Yuk Gabung di NAGAQQ: AGEN BANDARQ BANDARQ ONLINE ADUQ ONLINE DOMINOQQ TERBAIK
ReplyDeleteYang Merupakan Agen Bandarq, Domino 99, Dan Bandar Poker Online Terpercaya di asia hadir untuk anda semua dengan permainan permainan menarik dan bonus menarik untuk anda semua
Bonus yang diberikan NagaQQ :
* Bonus rollingan 0.5%,setiap senin di bagikannya
* Bonus Refferal 10% + 10%,seumur hidup
* Bonus Jackpot, yang dapat anda dapatkan dengan mudah
* Minimal Depo 15.000
* Minimal WD 20.000
Memegang Gelar atau title sebagai Agen BandarQ Terbaik di masanya
Games Yang di Hadirkan NagaQQ :
* Poker Online
* BandarQ
* Domino99
* Bandar Poker
* Bandar66
* Sakong
* Capsa Susun
* AduQ
* Perang Bacarrat (New Game)
Tersedia Deposit Via pulsa :
Telkomsel & XL
NAGAQQ: AGEN BANDARQ BANDARQ ONLINE ADUQ ONLINE DOMINOQQ TERBAIK
Info Lebih lanjut Kunjungi :
Website : NagaQQ
Facebook : NagaQQ Official
Kontakk : Info NagaQQ
linktree : Agen Judi Online
WHATSAPP 1 : +855977509035
Line : Cs_nagaQQ
TELEGRAM : +855967014811
BACA JUGA BLOGSPORT KAMI YANG LAIN:
agen bandarq terbaik
Winner NagaQQ
Daftar NagaQQ
Agen Poker Online
nice
ReplyDelete2048 gameshas a very low cost to entry, all things considered. The game is free and most people already have a phone or computer capable of running the game and there is plenty of free software out there to record runs.
ReplyDeleteGoogle started using site speed as a ranking signal in their algorithm way back in 2010, and it continues to serve as one of the many factors that determine where your website shows up in the search results. We help you WordPress Speed Optimization are Page Caching, PHP latest version, Image optimization and resizing, jquery update, Cache Preloading, Sitemap Preloading, GZIP Compression, Browser Caching, Database Optimization, Google Fonts Optimization, Lazyload, Minifying JS CSS HTML files, Deferring Unused JS/CSS, CDN setup, Mobile Detection, Stop unused CSS and JS file and many more optimization your WordPress website. So, your website super-fast loading within 1-5 seconds. WordPress Speed Optimization
ReplyDeleteHindi Status For Facebook Whatsapp
ReplyDeleteStatus
Thanks for the informative and helpful post, obviously in your blog everything is good.. ExcelR Data Analyst Course
ReplyDeleteI quite like reading an article that can make people think. Also, thanks for allowing for me to comment!
ReplyDeletebusiness analytics course
Thank you for sharing this amazing piece of content. You are doing a great job, thanks for it.
ReplyDeleteSad Shayari with Hindi Images, Sad Shayari for Facebook Whatsapp in Hindi Sad Quotes Hindi Best Sad Shayari Collection in Hindi
learn digital Marketing course
ReplyDeleteInformative blog
ReplyDeleteData Science Course in India
Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
ReplyDeleteOracle Dba training in bangalore
Oracle Dba institutes in bangalore
ReplyDeleteVERY HELPFULL POST
THANKS FOR POSTING
MERN STACK TRAININIG IN DELHI SASVBA
ARTIFICIAL INTELLIGENCE INSTITUTE IN DELHI SASVBA
MACHINE LEARNING TRAINING IN DELHI SASVBA
DEEP LEARNING TRAINING IN DELHI NCR SASVBA
GMB
SASVBA
FOR MORE INFO:
neuramis filler
ReplyDeleteJust a little background. We are a skincare retailer that specializes in Hyaluronic Acid Fillers and microneedling along with Korean Skincare/Kbeauty. I have listed a chunk of keywords below.
Anuvaa has the best Digital marketing Course in Mumbai
ReplyDeleteThanks for Sharing this article. It is very much vauable content Anuvaa offers the best Digital Marketing Courses in Mumbai
ReplyDeleteThanks for Sharing this article. It is very much vauable contentMahesh Mattta Sanda Wellness
ReplyDeleteThanks for Sharing this article. It is very much vauable content Mahesh Matta
ReplyDeleteYour article is very informative, thanks for this amazing post. I have also written some:
ReplyDeleteread more by shayariholic
read more by shayariholic
Hindi Shayari Collection
read more by shayari99
read more by shayari99
हिंदी शायरी
Very nice informative article, thanks for sharing.
ReplyDeletehttps://daremessages.com
Dare Messages
Yowa
takipçi satın al
ReplyDeletetakipçi satın al
takipçi satın al
SR Kalyanamandapam Movie Download
ReplyDeleteTelugu Torrent
Filmywap Movies Download
Tamilrockers Telugu
4Movierulz telugu
Movierulz
marsbahis
ReplyDeletebetboo
sultanbet
marsbahis
betboo
sultanbet
Одним з класичних способів підрізати нігті є короткий стиль. Короткі нігті часто вважаються більш практичними, але не завжди є багато класних дизайнів для них.
ReplyDeleteI wish more writers of this sort of substance would take the time you did to explore and compose so well. I am exceptionally awed with your vision and knowledge.
ReplyDeletedata scientist training in hyderabad
Register now to participate in the intensive AI Training in Hyderabad program taught by experts at the AI Patasala training center.
ReplyDeleteI trust you post again soon... Axel foley jacket
ReplyDeleteYou’re so cool! I do not believe I’ve truly read through a single thing like this before. So good to find somebody with a few original thoughts on this issue. Really.. many thanks for starting this up. This site is one thing that is required on the internet, someone with a little originality.
ReplyDelete야동
Hi there! I just want to offer you a huge thumbs up for the great information you have here on this post. I’ll be coming back to your website for more soon.
ReplyDelete오피
This website is really a walk-through for every one of the details you wanted concerning this and also didn't know who to ask. Glimpse right here, and also you'll absolutely uncover it.
ReplyDelete외국인출장
I'm satisfied, I must claim. Truly seldom do I run into a blog that's both educative as well as enjoyable, and let me tell you, you have struck the nail on the head. Your concept is impressive; the issue is something that inadequate individuals are speaking smartly about. I am very happy that I came across this in my search for something relating to this.마사지
ReplyDeleteAmazing Article! I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
ReplyDeleteData science course in pune
I am a new user of this site, so here I saw several articles and posts published on this site, I am more interested in some of them, will provide more information on these topics in future articles.
ReplyDeletedata science course in london
Online Training | Classroom | Virtual Classes
ReplyDeleteC# .Net Training with 100% placement assistance
1860 testers placed in 600 companies in last 8 years
Real time expert trainers
Indutry oriented training with corporate casestudies
Free Aptitude classes & Mock interviews
Great job get the best shayaries visit Shayarisove
ReplyDeleteits realy nice post
ReplyDeletebaixador videos twitter
This was an extremely wonderful post. Thanks for providing this info. little joe cartwright jacket
ReplyDeleteAPOTAC
ReplyDeletePython Training
Our the purpose is to share the reviews about the latest Jackets,Coats and Vests also share the related Movies,Gaming, Casual,Faux Leather and Leather materials available Squid Game Pink Jacket
ReplyDeleteAmazingly by and large very interesting post. I was looking for such an information and thoroughly enjoyed examining this one. Keep posting. An obligation of appreciation is all together for sharing.data analytics course in gwalior
ReplyDeleteThanks for this valuable information!
ReplyDeleteThis Comment Form
nice artcle seo services hyderabad
ReplyDeleteI love to recommend you Where can crawl Exciting Products latest Jackets, Coats and Vests Click Here Big Boss Leather Jacket
ReplyDeleteWow. That is so elegant and logical and clearly explained. Brilliantly goes through what could be a complex process and makes it obvious. Thanks for Sharing This Article. It is very so much valuable content. Digital marketing training Mumbai
ReplyDeleteVery nice blogs!!! i have to learning for lot of information for this sites…Sharing for wonderful information. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing digital marketing course Mumbai
ReplyDeleteONLEI Technologies
ReplyDeleteInternship
Best Online Python Certification Course
Best Online Data Science Certification Course
Best Online Machine Learning Certification Course
Python Training
Machine Learning
Data Science
Digital Marketing
Python Training In Mohali
ReplyDeleteData ScienceTraining In Mohali
Business Analyst Certification Training
ReplyDeleteDjango Course Online
Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!data scientist course in ghaziabad
ReplyDeleteRomantic Status
ReplyDeleteIncorrect Quotes Generator
Attitude Quotes
Attitude Status in English
I am a new user of this site, so here I saw several articles and posts published on this site, I am more interested in some of them, will provide more information on these topics in future articles.
ReplyDeletedata science course in london
Nice blog
ReplyDeleteDigital Marketing Institute in Mumbai
Best website to download Web Series movierulz4
ReplyDeleteGet the latest Movies on movierulz4 for free you can also download movies on this website
ReplyDeleteI really enjoyed reading your article. I found this as an informative and interesting post, so i think it is very useful and knowledgeable. I would like to thank you for the effort you made in writing this article. Hhh Leather Jacket
ReplyDelete
ReplyDeleteI like your post. I appreciate your blogs because they are really good. Please go to this website for Data Science course in Bangalore. These courses are wonderful for professionals.
this blog was really great, never seen a great blog like this before. i think im gonna share this to my friends.. data analytics course in mysore
ReplyDeleteLove Shayari in Hindi for Girlfriend
ReplyDeleteI was basically inspecting through the web filtering for certain data and ran over your blog. I am flabbergasted by the data that you have on this blog. It shows how well you welcome this subject. Bookmarked this page, will return for extra.https://360digitmg.com/course/certification-program-on-digital-marketing
ReplyDeleteGreat very helpful blog. Thanks For Sharing Such A Wonderful Blog. I will definitely go ahead and take advantage of this. Your Blog Is Very Informative. Again Thanks For Sharing This Blogs With Us. For more learning go through Skillslash.
ReplyDeleteFor Data Science Course Data Science Course In Bangalore
We are looking for an informative post it is very helpful thanks for sharing it. We are offering all types of leather jackets with worldwide free shipping.
ReplyDeleteBlack Leather Jacket
Leather Bomber Jacket
Mens Biker Leather Jacket
Western Leather Jackets
Nice Blog! such a informative things you are sharing ,I really liked your content. If you wanna know about "Skillslash | Training with live industry experience that gets you hired" go to Data science courses in bangalore
ReplyDeleteI am very impressed to read this blog. I hope you will continue to upload similar blogs. Thank you very much. I have an online store with the name FLYING LEATHER JACKET please visit for an awesome collection.
ReplyDeleteMEN AVIATOR LEATHER JACKETS
B3 BOMBER JACKETS
MOTOGP LEATHER SUIT
MOTOGP LEATHER JACKETS
seo fiyatları
ReplyDeletesaç ekimi
dedektör
instagram takipçi satın al
ankara evden eve nakliyat
fantezi iç giyim
sosyal medya yönetimi
mobil ödeme bozdurma
kripto para nasıl alınır
Shop this best Super quality Vault Don Johnson Trench Coat For Men SHOP NOW
ReplyDelete360DigiTMG, the top-rated organisation among the most prestigious industries around the world, is an educational destination for those looking to pursue their dreams around the globe. The company is changing careers of many people through constant improvement, 360DigiTMG provides an outstanding learning experience and distinguishes itself from the pack. 360DigiTMG is a prominent global presence by offering world-class training. Its main office is in India and subsidiaries across Malaysia, USA, East Asia, Australia, Uk, Netherlands, and the Middle East.
ReplyDeleteYou put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post. urdu poetry 2 lines
ReplyDeletebitcoin nasıl alınır
ReplyDeletetiktok jeton hilesi
youtube abone satın al
gate io güvenilir mi
referans kimliği nedir
tiktok takipçi satın al
bitcoin nasıl alınır
mobil ödeme bozdurma
mobil ödeme bozdurma
충주출장샵
ReplyDelete마포구출장샵
나주출장샵
출장샵
통영출장샵
일산출장샵 파주출장샵
ReplyDeleteMy Tractor Forum A family friendly forum community dedicated to all Tractor owners and enthusiasts. Come join the discussion about specifications, modifications, huawei manager 7 apk, huawei manager version 7, huawei manager 2022, huawei manager, huawei manager 6.1 apk, huawei manager apk, download huawei manager 6.1 apk, huawei manager v7 2022, huawei manager v7, huawei manger is one of the best apps that supports Huawei ..
ReplyDelete