I gang

Script Parser in VisualStudio 2010 C# WinForms

This project is to write a parser for a simple, proprietary scripting language. Script has defined structure, keywords, variable names, etc. Test script is included in the zip. The work must be done and delivered in VisualStudio 2010, C# WinForms (you must have this compiler).

There are two deliverables:

1) The VisualStudio 2010 C# project updated with code to correctly parse and execute the test script. The starting project with the GUI, basic class structure, and beginning work on parsing and running scripts is included in the zip. The script executes and stops when the first true statement is found. Execute means output the action, like it currently does.

2) Test cases for each script statement using variable values (stored as [url removed, login to view], etc). For each test case one statement should evaluate to TRUE and be executed. The first test case is included, vars1.txt.

This is the first part of a bigger project. If the work is done well then more will follow.

See script.txt for the script structure

// script rules:
// for holdem, hand is the 2 pocket cards
// hand = A suited >> ace and any other card suited
// hand = A >> ace and any other card
// hand = A K >> ace and king
// hand = KT >> king and ten
// hand = AK suited >> ace/king suited
// when the script is running, all of the variables will have a value: OpponentsAtTable, bets, raises, hand, pairinhand, opponents, in smallblind, in bigblind, calls, potsize, etc
// when the first true statement is encountered, execute the action, and stop parsing. to execute, just output it such as: ACTION=RaiseMax
// compound conditions: "when without action" applies to all following whens with actions, until the next "when without action" is found.
// words to ignore: custom, force, anything commented with //

custom

preflop

// start here if betRound == preflop

When OpponentsAtTable >= 1 fold force

When OpponentsAtTable = 1 and bets = 0 and raises = 0 and (hand = A suited or pairinhand or hand = AK or hand = A Q or hand = AJ or hand = K Q or hand = QJ suited or hand = J T suited or hand = T9 suited or hand = 98 suited or hand = 87 suited) RaiseMax force

When opponentsattable <= 4 and opponents = 1 and opponentisallin and (hand = A or pairinhand) and betsize < 34% stacksize call force

When stacksize < 20 and not (hand = AK or hand = AQ or hand = AJ or hand = AT or hand = A9 or hand = A suited or pairinhand or hand = KQ or hand = KJ suited or hand = QJ suited or hand = JT suited or hand = T9 suited) and not (in smallblind and calls >= 1 and raises = 0) fold force

When (hand = 22 or hand = 33 or hand = 44 or hand = 55 or hand = 66) and stacksize > 9 and stacksize < 20 and not (totalinvested > 75% stacksize) fold force

When TotalInvested > 330% stacksize raisemax force

When In BigBlind and raises = 1 and calls = 0 and amounttocall = 1 and lastraiserposition <= 3 and random <= 30 and (hand = AQ or hand = AJ or hand = AT or hand = A9 or hand = KQ or hand = KJ or hand = KT or hand = K9 or hand = QJ or hand = QT or hand = Q9 or hand = Q8 or hand = JT or hand = J9 or hand = J8 or hand = J7 or hand = T9 or hand = T8 suited or hand = 98 or hand = 87 suited or pairinhand) raise 2 force

When (hand = JJ or hand = TT or hand = 99) and raises = 2 and stacksize > 25 and (amounttocall < 24% potsize and amounttocall < 20% stacksize and amounttocall < 18) call force

When hand = Q Q and opponents = 1 and raises = 1 and OpponentIsAllIn and not ( AmountToCall < 43% PotSize or BetSize < 32% StackSize ) call force

When hand = KJ and (not hand = KJ suited) and stilltoact >= 6 fold force

// compound conditions: "when without action" applies to all following whens with actions, until the next "when without action" is found.

When OpponentsAtTable <= 2 and stacksize > 25 and ( hand = A T or hand = K J or hand = Q J ) // when without action
When raises = 1 and BetSize <= 5 call force
When raises = 0 and calls = 0 raise force

When ( hand = A A or hand = K K )
when random <= 8 and raises = 0 and calls = 0 and stacksize > 35 call force
when random <= 8 and raises = 0 and calls = 0 and stacksize > 35 raisemin force
when TotalInvested > 100% StackSize RaiseMax force
when raises >= 2 RaiseMax force
when BetSize > 25% StackSize RaiseMax force
when (BotsLastAction = raise or BotsLastAction = call) RaisePot force
when Others RaisePot force

// end of betRound == preflop

flop

// start here if betRound == flop

When TripsOnBoard and not (NutFullHouseOrFourOfAKind = 2 or NutFullHouseOrFourOfAKind = 1 or HaveQuads) and Betsize > 6 fold force

When BotIsLastRaiser
When (HaveFullHouse or HaveStraightFlush or HaveNutFlush or HaveTrips or HaveNutStraight or HaveSet) call force
When not (FlushPossible or StraightPossible) and HaveOverPair and (hand = AA or hand = KK) RaisePot force

// end of betRound == flop

turn

// start here if betRound == turn

When TripsOnBoard and not (NutFullHouseOrFourOfAKind = 2 or NutFullHouseOrFourOfAKind = 1 or HaveQuads or
HaveStraightFlush) and BetSize > 6 fold force

When opponents >=2 and position = first and bets = 0
When not (FlushPossible or PairOnBoard) and HaveNutStraight call force
When (not PairOnBoard) and HaveNutFlush call force
When not (QuadsOnBoard or TripsOnBoard or TwoPairOnBoard) and HaveFullHouse call force
When not (FlushPossible or PairOnBoard or StraightPossible) and HaveSet call force

// end of betRound == turn

river

// start here if betRound == river

When TripsOnBoard and not (NutFullHouseOrFourOfAKind = 1 or NutFullHouseOrFourOfAKind = 2 or HaveQuads or
HaveStraightFlush) and Betsize > 6 fold force

When TwoPairOnBoard and not (NutFullHouseOrFourOfAKind = 1 or NutFullHouseOrFourOfAKind = 2 or
NutFullHouseOrFourOfAKind = 3 or HaveQuads or HaveStraightFlush) and Betsize > 6 fold force

// end of betRound == river


Færdigheder: C# Programmering

Se mere: variable in programming, programming statement, c sharp test, c # sharp test, c sharp programming language, c programming if statement, c# beginning, beginning programming, beginning c sharp, beginning c programming, compiler language, c programming compiler, c gui programming, c winforms, gui script, write test script, parsing output script, language script, parser code, 2010 gui, zip code test cases, gui 2010, gui simple output, simple txt parser, gui winforms

Om arbejdsgiveren:
( 0 bedømmelser ) Big City, Malaysia

Projekt-ID: #5982527

Tildelt til:

cliscwang

[url removed, login to view] for your posting, I have read carefully your project first description and additional description. thanks for your big project. but your project is clear for me. I'm exciting in your project. I'm glad to ha Mere

$350 USD in 5 dage
(3 bedømmelser)
3.2

11 freelancere byder i gennemsnit $620 for dette job

vietitdotinfo

Hi. I can see it is script for holdem poker bot from bonusbots. I have exp in parsing and have done similar projects. I am ready to do for you. Thanks!

$750 USD in 5 dage
(41 bedømmelser)
6.0
specialist77

Hello, For this I would like to use the knowledge of graphs, automata theory, lexycal analyzers, parsers and compilers. The idea is from the language to create an in memory structure that will be used to detect the Mere

$766 USD in 12 dage
(7 bedømmelser)
5.2
fattahaabdul

Expert in script parser. i have 8+ years of experience. Can we discuss the project. Please initiate a chat with me so that we can discuss the project at a broader level. Why you should hire me- 1. I have a very g Mere

$1546 USD in 10 dage
(2 bedømmelser)
4.8
jatindhoot

Hi I have overall 10 years of experience and I have strong hands on building Websites, Web Services, Desktop Applications, Mobile Site and Mobile Applications. I have done some similar project for creating parser Mere

$526 USD in 10 dage
(1 bedømmelse)
4.4
szymszteinsl

Hi! I am professional C/C++/C#/Java programmer. I can do this project with highest satisfaction. Best Regards, Szymszteinsl

$400 USD in 4 dage
(7 bedømmelser)
4.3
chetanraj81lx

Hi, I hv excellent work exp in c# . I have worked since 2000 and having more than 14yrs exp in development. I can do this job,Please discuss more with me. Thanks

$673 USD in 10 dage
(2 bedømmelser)
3.7
debabratamandal

Hi, I have 8+ years of experience to work with most reputed MNC IT Company. My jobs includes analysis, design, develop, implementation and enhanced customized application modify existing applications to meet user ch Mere

$555 USD in 10 dage
(3 bedømmelser)
2.6
acronymsolutions

Hi, I have gone through your descriptions and Attachment,I understand it thoroughly,I am 5+ years experienced ASP.NET,C# developer at CMM5 level company.I can do your job easily before your deadline.I have already Inst Mere

$400 USD in 7 dage
(2 bedømmelser)
0.0
shahroz91

We can write a parser for a simple, proprietary scripting language. Script will be in defined structure, keywords, variable names, etc.

$300 USD in 5 dage
(0 bedømmelser)
0.0
yugalib

Hello, First of all Thank you for providing sample. That's makes easy to understand. This type of work is already created by me and base is ready which I can [url removed, login to view] requirement is always in RFID based devices where Mere

$555 USD in 10 dage
(0 bedømmelser)
0.0