Download The main objectives of this project are

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Artificial intelligence in video games wikipedia , lookup

Transcript
INSTITUTE OF ENGINEERING
PULCHOWK CAMPUS
PULCHOWK, LALITPUR
A PROJECT REPORT ON ARTIFICIAL INTELLIGENCE
CALLBREAK
Date of Submission: 2069-04-16
Submitted To:
Submitted By:
Department of Electronics
and Computer Engineering
Name: Sujit Maharjan
CRN: 066/BCT/540
Group: B
Abstract
This project is a part of course "Artificial Intelligence" and is intended for the fulfillment of
practical course of this subject. This project was done in about one month's time starting from
the last week of Ashar.
For the purpose, I have done CALLBREAK, in Adobe Flash. This is a typical popular Nepali
card game which is played among four players.
Acknowledgement
I would like to thank our teacher and Head of Department, Dr. Shashidhar Ram Joshi and Dr.
Sanjeeb Prasad Pandey, for providing us an opportunity to work on an Artificial Intelligence
based project and gain practical knowledge on th particular field. I am very grateful to him
for his suggestion, ideas and encouraging us to work on this project. I would like to thanks
for Mr. Anil Verma and Mr. Shayak Raj Giri for their valuable suggestions throughout the
project.
I would also like to thank my friends for their ideas and help.
Sujit Maharjan
066 BCT 540
Introduction
Call Break is a strategic trick-based card game played by four players with a standard deck of
52 playing cards. The game is very similar to other trick-based game especially Spades.
In Call Break the term "hand" is used instead of trick, and "Call" is used instead of bid. After
each deal player have to make a "Call" or "bid" for the number of hands he/she can capture,
and the objective is to capture at least that many hand in a round, and try to break other player
i.e. stop them from getting their Call.
After each round, points will be calculated and after five rounds of play each players five
rounds points will be added as a total points and player with highest total point will win.
Objectives
The main objectives of this project are:
1. To build typical Nepali Card Game "CALLBREAK" using AI.
2. To implement various algorithms of AI.
Explanation
A deck of 52 cards is first randomly shuffled. Then, the cards are distributed among the four
players by the host player, each will have 13 cards.
The host player is the one who distributes the cards. All of the players have to estimate some
bids which should be at least 1. The player who exceeds the estimated points will have calls
which will be added after a decimal of estimated points. Players failing to get the estimated
hands will have negative marking. The turn of hitting the card goes cyclic but at a completion
of a cycle, the player who wins the cycle hosts the next cycle.
There will be 5 games in all. And the player scoring the highest point wins the game. After
completion of forth game, the aggregation will be made to make a definite strategy in the
game and say the required estimated points.
Some of the rules of the games are:
a) The host player who wins a round starts next round. The suit of the card thrown by the host
will be the suit of that round and all other player have to throw higher cards of same suit, if
higher card of same suit is not present, he can throw any card of same suit. In case of not
having any card of same suit, he should throw card of spade which should be highest of all
present if any otherwise can throw any suit of card.
b) Card of Spade is the most powerful card but there would be hierarchy between the cards of
Spade.
c) Player failing to follow the rules of the game will have negative point.
Methodology
This project is built on Adobe Flash Professional CS6 platform. We have used Action Script
as a programming language for this project. We have used cards api from flashmath for
displaying cards in the game.
Computer shuffles a deck of cards and distributes 13 cards to each game. When a player
throws a card, then it checks the series of rules and if the rule is satisfied then the card is
thrown.
This exam is alike an expert system, we have use a built a series of game rules and the
computer chooses the best condition on the basis of cards in the player's hand and cards gone.
Some of the branches of AI that we have used in this project are:
a) Search Algorithms
b) Expert System
Output
Fig: A
View of the game when it starts
Fig: B
View of game while playing
Fig: C
View of points in the game
Limitations and Future Enhancement
a) The computer cannot detect the players in negative suit, so there is possibility of enhancing
game by noticing the negative suit to players.
b) The game can be enhanced using multiple level of difficulty.
c) Point estimation can be enhanced through more efficient algorithms and adding more
conditions.
d) Further the game can be modified for public.
References
a) Flash Professional Help / Help and tutorials
http://helpx.adobe.com/flash/topics.html
b) Custom Classes for Playing Cards in ActionScript 3
http://www.flashandmath.com/howtos/carddeal/
c) ActionScript 3.0 for Adobe Flash Professional CS5 Classroom in a Book.pdf