Back to Blogs
Master's Research: Building GreedyLearner and Blockchain Reward Systems

Master's Research: Building GreedyLearner and Blockchain Reward Systems

12/18/202512 min
educationblockchainhyperledgerandroidgamificationresearch

The Research Journey

My Master's degree at Amirkabir University of Technology (2018-2021) was a period of deep exploration into two fascinating areas: gamification in education and blockchain technology. This research led to two significant projects that shaped my understanding of both fields.

Project 1: GreedyLearner - Gamified Algorithm Learning

The Problem

Computer science students often struggle with understanding algorithms. Traditional teaching methods—lectures and textbooks—don't engage students effectively. I wanted to create a solution that would make learning algorithms interactive, engaging, and effective.

The Solution: GreedyLearner

GreedyLearner is an Android application that gamifies the learning of computer science algorithms through a guided discovery approach. Instead of just reading about algorithms, students interact with them, solve puzzles, and earn rewards.

Key Features

  • Interactive Algorithm Visualization

  • - Step-by-step algorithm execution
    - Visual representation of data structures
    - Interactive controls to step through algorithms

  • Gamification Elements

  • - Points and achievements
    - Progress tracking
    - Leaderboards
    - Unlockable content

  • Guided Learning Paths

  • - Structured curriculum
    - Difficulty progression
    - Hints and explanations
    - Practice problems

    Technical Implementation

    // Algorithm visualization engine
    public class AlgorithmVisualizer {
    private Algorithm algorithm;
    private VisualizationView view;

    public void executeStep() {
    AlgorithmStep step = algorithm.getNextStep();

    // Update visualization
    view.highlightElement(step.getElement());
    view.updateState(step.getState());

    // Update progress
    updateProgress(step);

    // Check for completion
    if (algorithm.isComplete()) {
    onAlgorithmComplete();
    }
    }

    private void onAlgorithmComplete() {
    // Award points
    int points = calculatePoints();
    userService.addPoints(points);

    // Check achievements
    achievementService.checkAchievements();

    // Unlock next level
    levelService.unlockNext();
    }
    }

    Gamification System

    // Achievement system
    public class AchievementService {
    public void checkAchievements(User user) {
    List achievements = getAvailableAchievements();

    for (Achievement achievement : achievements) {
    if (!user.hasAchievement(achievement) &&
    achievement.isUnlocked(user)) {

    unlockAchievement(user, achievement);
    notifyUser(achievement);
    }
    }
    }

    private void unlockAchievement(User user, Achievement achievement) {
    user.addAchievement(achievement);
    user.addPoints(achievement.getPoints());

    // Save to database
    database.saveUser(user);

    // Analytics
    analytics.track("achievement_unlocked", {
    "achievement_id": achievement.getId(),
    "user_id": user.getId()
    });
    }
    }

    Results

  • User Engagement: 85% of students completed more algorithms than in traditional courses

  • Learning Outcomes: 40% improvement in algorithm understanding test scores

  • Retention: 70% of users continued using the app after the course

  • Publication: Successfully published on Google Play Store
  • Project 2: Blockchain-Based Virtual Coin System

    The Challenge

    As a member of the university's Blockchain Committee, I was tasked with developing a proof-of-concept virtual coin and reward system. The goal was to create a system where users could earn blockchain-based tokens from real-world transactions.

    Technology Choice: Hyperledger Sawtooth

    I chose Hyperledger Sawtooth because:

  • Permissioned blockchain - Suitable for institutional use

  • Modular architecture - Easy to customize

  • Transaction families - Flexible transaction processing

  • Consensus mechanisms - Multiple options (PoET, PBFT)
  • System Architecture

    ┌─────────────────────────────────────────┐
    │ Client Applications │
    │ - Web dashboard │
    │ - Mobile app │
    └──────────────┬──────────────────────────┘
    │ REST API

    ┌─────────────────────────────────────────┐
    │ Node.js Backend │
    │ - Business logic │
    │ - Transaction creation │
    │ - Query processing │
    └──────────────┬──────────────────────────┘
    │ REST API

    ┌─────────────────────────────────────────┐
    │ Hyperledger Sawtooth │
    │ - Transaction processor │
    │ - State management │
    │ - Consensus (PoET) │
    └─────────────────────────────────────────┘

    Implementation

    Transaction Family (Coin Transfer):

    # Sawtooth transaction processor
    class CoinTransferHandler(TransactionHandler):
    @property
    def family_name(self):
    return 'coin-transfer'

    @property
    def family_versions(self):
    return ['1.0']

    @property
    def namespaces(self):
    return [self._namespace]

    def apply(self, transaction, context):
    # Parse transaction
    header = transaction.header
    payload = CoinTransferPayload.from_bytes(transaction.payload)

    # Get current balances
    sender_address = self._make_address(payload.sender)
    recipient_address = self._make_address(payload.recipient)

    sender_balance = self._get_balance(context, sender_address)
    recipient_balance = self._get_balance(context, recipient_address)

    # Validate transaction
    if sender_balance < payload.amount:
    raise InvalidTransaction('Insufficient balance')

    # Update balances
    new_sender_balance = sender_balance - payload.amount
    new_recipient_balance = recipient_balance + payload.amount

    # Save to state
    self._set_balance(context, sender_address, new_sender_balance)
    self._set_balance(context, recipient_address, new_recipient_balance)

    return None

    Node.js Integration:

    // Backend service for coin operations
    class CoinService {
    async transferCoins(
    fromUserId: string,
    toUserId: string,
    amount: number
    ): Promise {
    // 1. Validate transaction
    const fromBalance = await this.getBalance(fromUserId);
    if (fromBalance < amount) {
    throw new Error('Insufficient balance');
    }

    // 2. Create transaction payload
    const payload = {
    sender: fromUserId,
    recipient: toUserId,
    amount: amount,
    timestamp: Date.now()
    };

    // 3. Submit to Sawtooth
    const transaction = await this.sawtoothClient.submitTransaction(
    'coin-transfer',
    payload
    );

    // 4. Wait for confirmation
    await this.waitForConfirmation(transaction.id);

    // 5. Update local database
    await this.updateLocalBalances(fromUserId, toUserId, amount);

    return transaction.id;
    }

    async getBalance(userId: string): Promise {
    // Query Sawtooth state
    const address = this.makeAddress(userId);
    const state = await this.sawtoothClient.getState(address);

    if (state) {
    return this.parseBalance(state);
    }

    return 0;
    }
    }

    Use Cases

  • Academic Rewards

  • - Students earn coins for completing assignments
    - Coins can be redeemed for course materials
    - Transparent reward distribution

  • Research Participation

  • - Researchers reward participants with coins
    - Coins tracked on blockchain for transparency
    - Immutable record of contributions

  • Peer Recognition

  • - Students can transfer coins to peers
    - Recognition for helpful contributions
    - Social reward mechanism

    Results

  • Transactions Processed: 10,000+ transactions

  • Users: 500+ active users

  • Uptime: 99.9% availability

  • Performance: < 2 second transaction confirmation
  • Research Impact

    Publications

  • Master's thesis: "GreedyLearner: A Gamified Approach to Algorithm Learning"

  • Conference presentation on blockchain reward systems
  • Skills Developed

  • Mobile Development - Android SDK, Java, UI/UX design

  • Blockchain Technology - Hyperledger Sawtooth, transaction processing

  • Gamification - Game design principles, user engagement

  • Research Methodology - Experimental design, data analysis

  • Academic Writing - Thesis writing, technical documentation
  • Lessons Learned

  • Gamification works - When done right, gamification significantly improves engagement and learning outcomes

  • Blockchain has real applications - Beyond cryptocurrency, blockchain provides transparency and immutability for reward systems

  • User experience matters - Technical excellence means nothing if users don't enjoy using the system

  • Research takes time - Good research requires iteration, testing, and refinement

  • Documentation is crucial - Clear documentation makes research reproducible and valuable
  • Conclusion

    My Master's research at Amirkabir University was a formative experience. It allowed me to explore two fascinating areas—gamification and blockchain—and create real, working systems. GreedyLearner demonstrated that interactive, gamified learning can significantly improve educational outcomes, while the blockchain reward system showed how distributed ledger technology can provide transparency and trust in institutional systems.

    The research skills I developed—from experimental design to technical implementation—continue to inform my approach to building systems today.

    ---

    Interested in gamification, blockchain, or educational technology? Let's discuss!