₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,330,976 members, 8,448,061 topics. Date: Sunday, 19 July 2026 at 04:34 PM

Toggle theme

Progeek37's Posts

Nairaland ForumProgeek37's ProfileProgeek37's Posts

1 2 3 4 5 6 7 8 9 10 (of 13 pages)

ProgrammingRe: How I Built And Trained AI Model That Plays Whot by progeek37(op): 6:38am On Jun 27
Personperson01:
Interesting but not interesting enough in an era where agent Ai is about to take over. Problem is I don't understand where this is a use case. Games are just one of many tricks programming and programmers try to use to explain models to non coders.
Impressive though and good use of your time.
Not just gaming, even LLM can be explained in the same way. We can't possibly show the maths behind RL for non coders. We must explain step by step.
ProgrammingRe: How I Built And Trained AI Model That Plays Whot by progeek37(op): 9:40pm On Mar 14
ProgrammingHow I Built And Trained AI Model That Plays Whot by progeek37(op):
After taking machine learning and AI courses, I gave myself the task to build a practical AI model that can play the Whot! Card Game at human level. Of course as we all know Whot! Game is a blend of skill and luck, skill if you know how to utilize your available cards effectively and luck if you are fortunate to pick more win-bound special cards than your opponent.

As Artificial Intelligence keeps advancing in this age, it does seem that there is basically nothing that cannot be affected by the effect of AI. We wish to build an AI model that can be deployed to the public equipped with the capability of playing the Whot! Card Game, this vision has now given birth to a Whot! AI. We can also use this project to demystify AI, you might think AI is one big unreachable thing, but No you can build your own AI. If you study Statistics a bit, then Machine Learning which is a subset of AI that deals with the algorithms of Artificial Intelligence is similar to the way you predict the future using available dataset using your knowledge of Statistics. For example, if the price is $1000 given certain conditions, how will the price look like given some new conditions?

THE WHOT! AI

The new Whot! AI is an AI model that plays the Whot! Card Game. This model is trained using a Machine Learning approach known as Reinforcement Learning (RL). Reinforcement learning is ML techniques that involve exposing an AI agent to an environment and allowing it learn by directly interacting with the environment. This is an unsupervised learning method that does not require label data for training. In typical ML learning approach, we gather labelled data, here labelling in layman terms means knowing the questions and answers about the data. Questions like, does the animal have small weight, does it have whiskers, does it have long tail, and is its face round or oval, what is its weight in kilograms? By asking and getting the answers to the questions we can come up with a ML model that can classify image of an animal as either dog or cat. However, this kind of learning is cool if we have enough of such data; if we do not have such data, it becomes very difficult to build an AI model that we can trust.

For rule-based game like Whot! Card game, gathering such data will not only be unreachable, but it will also be difficult if not impossible to train an AI that can perform 100% correctly using traditional supervised learning approach, since game rule must be followed 100%. If for instance the call card is Circle 7 and the model predicts to play Star 7, this breaks the game rule. So using such traditional supervised learning technique for gaming applications is nearly unreachable and infeasible.

REINFORCEMENT LEARNING AND WHOT! AI

This barrier can be broken using Reinforcement Learning! In 2016 AlphaGo developed by Google Deep Mind using Reinforcement Learning, defeated human world champion Lee Sedol. Reinforcement is applied not only in gaming but also in finance for instance in fraud detection, it also finds itself in Robotics. One beautiful thing about Reinforcement Learning is we don’t need to tell agent how to do something we just tell the agent what to do, it will learn how to do it by itself.

How then does it work? As described earlier, this technique involves putting an AI agent in an environment and allowing it to learn by interacting with the environment. This environment can for instance be Whot! Game environment. In an environment there is a state and action. A state is the relative condition of the environment at a particular time and the action is the “right” i.e. most proper thing to do at such given state. We will use Whot! game to explain this more clearly. The state of the game can be the current call card, the draw pile size, your hand size, your opponent hand size etc. So we can ask if the call card is Pick Two, and you have pick two card in your pile, what is the best action to take in such a state? According to Whot! rule, for this state there are two valid actions:

Action 1: play a new pick two card to defend.

Action 2: Draw two cards from draw pile.

This led us to a state-value and state-action value function, so our goal is now to derive a policy called 𝞹 (Pi) that maps a given state to an action, if we find such a policy then we can model an AI that plays the Whot game. At first AI agent may not know the right action to take in any state, so it is allowed to take some random valid actions and later on it will no longer take random actions but rather start taking actions that maximize its rewards, so we basically develop a Q-table (think of this as database table) which the agent can reference for action. For any state it checks the table for any action with maximum reward, but when the state is large and continuous using such table becomes ineffective so we adopt a Q-network approach using Deep Learning, we hope the Q-network will generalize more than the Q-table. The core idea is design a reward function for guiding agent learning journey. If it takes a good action like defending pick two when it has pick two card, we give it a positive reward like +1 (encouragment), this positive reward is like saying to it “Good boy! You are doing well!” if it takes a bad action like drawing two cards when it can defend, we give it a small negative reward like -1 (punishment). Then we update its learning policy accordingly using a Mathematical equation known as Bellman Equation. The agent continues to make moves and get encouraged or punished, this can be repeated for up to 10, 000 episodes or more. Check the Whot AI training details, because Whot! game is so stochastic, the model was trained over 50, 000 episodes. Through this training, the agent will learn to avoid those actions that give it negative rewards and learn to do the things that give it positive rewards. After the episodes, we hope it will learn to interact with the game environment optimally.

To explain further, let’s consider Robotics application, let us take an example of how Reinforcement Learning might be useful here. Let’s say we want to train AI models to follow the leader dance. We have a led dancer possibly a human dancer. The task is to train the models to follow the same dance steps of the leader. If the leader raises hands up, we expect the robots to also raise hands up etc. We also apply RL here, we allow it to initially take some random dance step which may not be the same step of the leader, each time a model takes a wrong dance step, we give it negative reward. If it takes the same dance step of the leader, we give it a positive reward. After repeating task for thousands of times, the models will learn to make the dance movements as the leader.

THE TRADITIONAL RULE-BASED ENGINE AND RL

However to train an AI model to play Whot! we need a game rule. So we use the traditional rule-based engine. The Whot! Game you have been playing up to now is called rule-based engine, it is so called because the rule is explicitly programmed and computer follows the instructions to play the game. The idea is to use this rule-based engine to train AI model. Essentially, the agent will typically play against this rule-based engine and later on play against itself and continue to gather experiences through reward function. As you can see from the training details, even though the agent was trained using this traditional rule-based engine, after the end of 50, 000 episodes, it won 28,315 times by getting rid of cards first, won 18, 095 by counting. That is close to winning 40, 000 out of 50, 000! The AI agent has definitely outplayed and outperformed the rule-based engine that trained it; this means the agent has learned pattern and rules of Whot! Game more than the traditional rule-based engine. The traditional engine itself is a tough opponent, it is explicitly programmed for instance to compute the card it will play to get longest streak, something like: HoldOn, HoldON, Suspension, General Market, PickTwo, Check up! For an agent to outplay such an opponent means it has generalized more than the engine.

DOWNLOAD AND TEST THE MODEL

You can test the model by downloading its Android App from the link below, as add-ons we also implemented the traditional rule-based engine (classic computer opponent) as well as multiplayer feature through Bluetooth, Wi-Fi and Online. We hope you enjoy the Whot! game in a modern way.

Please note I am not a game developer, however I managed to design the game UI using native code and the game is sponsored by ads(for database/server costs). I just hope you enjoy AI-powered Whot gameplay.

Please play the game and rate and review the app. Thank You.

Whot! AI — Smart Card Game

https://play.google.com/store/apps/details?id=com.neosoft.whotai

If you are a developer you can check out the training of the model Whot! game rule:

https://gr8nd.github.io/whot/game.ipynb

And check out the card image recognition here:

https://gr8nd.github.io/whot/Whot Image Classification Full.ipynb

ProgrammingRe: App Developer Is Needed by progeek37(m): 4:29pm On Feb 20, 2024
researcherdotcom:
Good morning my people and all officials here.
I started a business in a student dominated environment and i need an app for the business.
I open a mini market where all frozen food, food stuff and kitchen needs are being sold.
I need an app where, students in the comfort of their room can place and order, make payment. We receive both the order and payment and in return supply them.
That from the comfort of their room
They place order for
Tomatoes.......#500
Pepper............#200
Maggi .............#50
Ponmon.........#300
Turkey............1kg
Then the app will do the summation
They proceed to pay
We receive the order and payment and we pay
Contact me on Whatsapp 08060487783
Pls, officials (mod) help me to push this to front page.
I need to build this within the next 2 weeks.
Thanks
I can build it for you. Check out similar low cost app that I built. Check my profile here for my contact. You also reply me here

https://play.google.com/store/apps/details?id=com.excellentcasual
ProgrammingRe: Avoid The Hard Ways Of Learning Programming by progeek37(op): 1:16pm On Jan 06, 2024
Message me on WhatsApp to build your mobile apps or to learn to build one by yourself. 08135683431
ProgrammingRe: First Thing First, Learn To Program! by progeek37(op): 1:15pm On Jan 06, 2024
Learn to build mobile apps and build your apps. Message me on WhatsApp 08135683431
ProgrammingRe: Avoid The Hard Ways Of Learning Programming by progeek37(op): 9:48pm On May 27, 2023
Software Development And Training still on Contact Us 09114901831
ProgrammingRe: First Thing First, Learn To Program! by progeek37(op): 9:48pm On May 27, 2023
Software Development And Training still on Contact Us 09114901831
ProgrammingRe: First Thing First, Learn To Program! by progeek37(op): 7:47pm On Jan 08, 2023
Hi everyone! My Tutorial class is still on, it includes Java, C#, Python etc programming and algorithms and data structures is done via Google Meet, TeamViewer or Zoom which support computer screen sharing, recording and voice communication etc. Contact me today.

Message me on WhatsApp:

08135683431
ProgrammingRe: You Would Better Start Programming With Java Or C# by progeek37(op): 7:46pm On Jan 08, 2023
Hi everyone! My Tutorial class is still on, it includes Java, C#, Python etc programming and algorithms and data structures is done via Google Meet, TeamViewer or Zoom which support computer screen sharing, recording and voice communication etc. Contact me today.

Message me on WhatsApp:

08135683431
ProgrammingRe: You Would Better Start Programming With Java Or C# by progeek37(op): 8:36am On Dec 04, 2022
Tutorial class I offere is on Java, C#, Python etc programming and algorithms and data structures via Google Meet, TeamViewer or Zoom which support computer screen sharing, recording and voice communication etc. are on going now. Contact me today.

Message me on WhatsApp:

08135683431
ProgrammingRe: Avoid The Hard Ways Of Learning Programming by progeek37(op): 8:35am On Dec 04, 2022
My tutorial class on Java, C#, Python etc programming and algorithms and data structures via Google Meet, TeamViewer or Zoom which support computer screen sharing, recording and voice communication etc. are on going now. Contact me today.

Message me on WhatsApp:

08135683431
ProgrammingRe: Tips On Solving Programming Problems by progeek37(op): 2:27pm On Nov 06, 2022
Contact me on WhatsApp to learn coding and algorithms and data structures: 08135683431
ProgrammingRe: Avoid The Hard Ways Of Learning Programming by progeek37(op): 9:13pm On Oct 09, 2022
Wasmillar14:
Pls add me as a Beginners. 09033149667.
Message me on WhatsApp 08135683431
ProgrammingRe: When Does A Beginner Become A Programmer, And Should Start Applying For Jobs? by progeek37(op): 11:30am On Oct 09, 2022
My tutorial class on Java, C#, Python etc programming and algorithms and data structures via Google Meet, TeamViewer or Zoom which support computer screen sharing, recording and voice communication etc. are on going now. Contact me today.

Message me on WhatsApp:

08135683431
ProgrammingRe: You Would Better Start Programming With Java Or C# by progeek37(op): 11:29am On Oct 09, 2022
My tutorial class on Java, C#, Python etc programming and algorithms and data structures via Google Meet, TeamViewer or Zoom which support computer screen sharing, recording and voice communication etc. are on going now. Contact me today.

Message me on WhatsApp:

08135683431
ProgrammingRe: Avoid The Hard Ways Of Learning Programming by progeek37(op): 11:29am On Oct 09, 2022
My tutorial class on Java, C#, Python etc programming and algorithms and data structures via Google Meet, TeamViewer or Zoom which support computer screen sharing, recording and voice communication etc. are on going now. Contact me today.

Message me on WhatsApp:

08135683431
ProgrammingRe: Avoid The Hard Ways Of Learning Programming by progeek37(op): 9:56am On Sep 19, 2022
I host tutorial class on Java, C#, Python etc programming and algorithms and data structures via Google Meet, TeamViewer or Zoom which support computer screen sharing, recording and voice communication etc.

Message me on WhatsApp:

08135683431
ProgrammingRe: You Would Better Start Programming With Java Or C# by progeek37(op): 9:55am On Sep 19, 2022
I host tutorial class on Java, C#, Python etc programming and algorithms and data structures via Google Meet, TeamViewer or Zoom which support computer screen sharing, recording and voice communication etc.

Message me on WhatsApp:

08135683431
ProgrammingRe: Avoid The Hard Ways Of Learning Programming by progeek37(op): 2:03pm On Sep 15, 2022
1 Behold, the LORD’s hand is not shortened, That it cannot save; Nor His ear heavy, That it cannot hear. 2 But your iniquities have separated you from your God; And your sins have hidden His face from you, So that He will not hear.
ProgrammingRe: The Fail-safe Way For You To Become A Good Computer Programmer by progeek37(op): 2:03pm On Sep 15, 2022
You can contact me on WhatsApp via 08135683431 to subscribe to my tutorial class on programming and algorithms and data structures.
ProgrammingRe: First Thing First, Learn To Program! by progeek37(op): 10:57am On Sep 09, 2022
Contact me on WhatsApp to learn programming and algorithms and data structures. 08135683431
ProgrammingRe: Avoid The Hard Ways Of Learning Programming by progeek37(op): 10:57am On Sep 09, 2022
Contact me on WhatsApp to learn programming and algorithms and data structures. 08135683431
ProgrammingRe: Avoid The Hard Ways Of Learning Programming by progeek37(op): 12:03pm On Sep 06, 2022
If you need to learn algorithm and data structures, you can contact me on WhatsApp via 08135683431
ProgrammingRe: Free Coding Ask And Answer (CAA) Group by progeek37(op): 1:13pm On Sep 05, 2022
Gentledude52:
Good evening. Please add me 08037536533
message me on WhatsApp 08135683431
ProgrammingRe: Free Coding Ask And Answer (CAA) Group by progeek37(op): 9:54am On Sep 04, 2022
Join my coding group or subscribe to my tutorial class. WhatsApp: 08135683431
ProgrammingRe: Join This Thread If You Want To Master Algorithms And Data Structures by progeek37(op): 5:08pm On Sep 02, 2022
Message me on WhatsApp if you want to subscribe to my tutorial class on programming and algorithms and data structures: 08135683431
ProgrammingRe: Tips On Solving Programming Problems by progeek37(op): 8:52pm On Sep 01, 2022
Message me on WhatsApp 08135683431 to subscribe to my tutorial class.
ProgrammingRe: How Many Languages Are You Supposed To Learn? by progeek37(op): 8:52pm On Sep 01, 2022
Message me on WhatsApp 08135683431 to subscribe to my tutorial class.
ProgrammingRe: Learn The Fundamental Of Programming Using The Zoom App. by progeek37(op): 8:51pm On Sep 01, 2022
Message me on WhatsApp 08135683431
ProgrammingRe: Avoid The Hard Ways Of Learning Programming by progeek37(op): 11:04am On Aug 31, 2022
Fairbanks:
Pls add me 07033954485
Send me a WhatsApp message on 08135683431
ProgrammingRe: First Thing First, Learn To Program! by progeek37(op): 9:31am On Aug 29, 2022
Subscribe to my tutorial class by messaging me on WhatsApp 08135683431

1 2 3 4 5 6 7 8 9 10 (of 13 pages)