Ladislav Végh Profile Ladislav Végh

Simulations of solving a single-player memory card game with several implementations of a human-like thinking computer algorithm

  • Authors Details :  
  • Ladislav Vegh,  
  • Ondrej Takac

Journal title : International Journal of Advanced Natural Sciences and Engineering Researches

Publisher : All Sciences Proceedings

Online ISSN : 2980-0811

Page Number : 229-238

Journal volume : 7

Journal issue : 6

430 Views Original Article

The memory card game is a game that probably everyone played in childhood. The game consists of n pairs of playing cards, whereas each card of a pair is identical. At the beginning of the game, the deck of cards is shuffled and laid face down. In every move of the game, the player flips over two cards. If the cards match, the pair of cards is removed from the game; otherwise, the cards are flipped back over. The game ends when all pairs of cards have been found. The game could be played by one, two, or more players. First, this paper shows an optimal algorithm for solving a single-player memory card game. In the algorithm, we defined four steps where the user needed to remember the earlier shown pairs of cards, which cards were already shown, and the locations of the revealed cards. We marked the memories related to these steps as M1, M2, M3, and M4. Next, we made some simulations as we changed the M1, M2, M3, and M4 memories from no user memory (where the player does not remember the cards or pairs of cards at all) to a perfect user memory (where the player remembers every earlier shown card or pair of cards). With every memory setting, we simulated 1000 gameplays. We recorded how many cards or pairs of cards the player would need to remember and how many moves were required to finish the game. Finally, we evaluated the recorded data, illustrated the results on graphs, and drew some conclusions.

Article DOI & Crossmark Data

DOI : https://doi.org/10.59287/ijanser.1158

Article Subject Details


Article Keywords Details



Article File

Full Text PDF



More Article by Ladislav Végh

Models of data structures in educational visualizations for supporting teaching and learning algorithms and computer programming

Teaching and learning computer programming is challenging for many undergraduate first-year computer science students. during introductory programming courses, novice programmers n...

Using interactive web-based animations to help students to find the optimal algorithms of river crossing puzzles

To acquire algorithmic thinking is a long process that has a few steps. the most basic level of algorithmic thinking is when students recognize the algorithms and various problems ...

Comparing machine learning classification models on a loan approval prediction dataset

In the last decade, we have observed the usage of artificial intelligence algorithms and machine learning models in industry, education, healthcare, entertainment, and several othe...

Analyzing game strategies of the don’t get angry board game using computer simulations

In the research described in this paper, we used computer simulations to analyze and compare different types of game strategies in the popular board game don't get angry. following...