Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
war2ladder
Newbie


Joined: 03 May 2002
Posts: 0

PostPosted: Sun Mar 31, 2002 10:28 pm   

A very difficult request.
 
There's an pacman ascii game on my MUD whose output looks like the following:




) / (
/| )_/( /| * / | (/|/) / | *
|`._____________/__|__o____`|'/___o__|________.'|
| '^` | |/ '^` |
| | V level: 0001 | Dir: left
| . . . . . . . . . . | @ = Bottomless Pit | Points: 0
| . . . . . p . . . . | Y = Power Up | Exp: 0
| . . . . . . . . o . | p = Prize |
| p . . . p . . . . . | o = You |
| p . . @ . p . . . . | a = Animal |
| . . . . . . . . . . | To Move Type: |
| . . p . . . . a a . | go |up|down|left|right||
| . . . . . . . . . . | |
| . . . . p . . . . . | Cost of 150 exp per MV |
| . . . @ . . . . . . | If you have exp. |
| | |
| | NEEDED: 07 HAVE: 00 |
| .______________________|_______________________.|
|' l / / \ / l `|
* l / V )) V l *
l/ // I
V



You (and the animals) move once each time you type "go up/down/left/right" and you attempt to get as high a level as possible by getting the prizes (the area resets randomly each time all the prizes are picked up).

An imm doesn't believe zmud is advanced enough to allow a scripting system to be made to auto-play. I know it's possible but I definitely lack the skill. Here's where you come in:). What needs to be done is for the player to pick up all the prizes (p's) while avoiding the animals and bottomless pits (a's and @'s)

Tough, huh?
-Blitz
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sun Mar 31, 2002 11:47 pm   
 
Its not that hard just code intensive.

The key tends to be to get the animal stuck
or dead then move about.

Mainly its just code intensive to put together. If they can code it for the mud,
it can be scripted.

Ton Diening
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Apr 01, 2002 12:55 am   
 
Yup, it's not really hard. You can catch the info by using some fixed-width patterns and the instructions on the right. Then you store everything in stringlists which will represent the playing field. 10 stringlists will do.

After you have everything captured, it's a matter of converting the same logic you use to play the game into code using as reference the information you get from the stringlists. Basically, in each turn, you need to find out where you are, which prizes are near, and which animal are near. While walking towards a prize, if an adjacent spot has a pit or an animal, then don't move into that spot.

This would be a dumb version. You can make it smarter by assuming that each animal will try to take the shortest path to you and figure a way to reach the next prize without getting cornered by an animal. However, this is requires more code than the previous one.

Kjata
Reply with quote
war2ladder
Newbie


Joined: 03 May 2002
Posts: 0

PostPosted: Mon Apr 01, 2002 1:54 am   
 
I'm pretty much a zMUD newbie when it comes to scripting, so could you help me out a little with the syntax for these "fixed-width stringlists" and how to refer to them in the code? Let's say I have a string that looks like

. . . p . o . . @ .

representing one of the lines in the game.
How would I write code saying that this means to go 2 left?

I understand the gist of what you're saying, I just don't know the commands I need to translate it into the actual programming language.
Reply with quote
undergod
Wanderer


Joined: 27 Jun 2001
Posts: 82

PostPosted: Mon Apr 01, 2002 8:27 pm   
 
You wouldn't make a code that moves two left on this code:
. . . p . o . . @ .

You would make code that makes you move one left to this:
. . . p o . . @ . .

and then turns that into one left again
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Apr 02, 2002 4:46 am   
 
I am highly intrigued by this thread. I would like to write something for you, but before I can I must know a few things...

1. Can animals fall into a bottomless pit.
2. Does the player move then the animals?
3. What is the order of precedence for the animal movements?
4. Can animals step on prizes?
5. Does the powerup let you destroy an animal? How many?
6. If yes for 5 do they come back?
First is easy to test and you prolly already know. The second is harder to figure, but may be able to be determined after or as you find the third out. In order to determine those two you will have to manuever the following situation a few times.

...o....
........
......a.
.a......
From there step right to create a perfect diagonal with both animals, and obeserve the movement. If both are up then up is likely prefered and animals move second. Preform similar arrangements with the animals to the left, right and up of you instead of the down.

I will also need a raw output log of you playing, hopeful more then one, and at least one in which you succesfully complete a level. Also depending on the answers for 5 and 6 I may need to see a log with that as well. That can emailed to me: vijilant@nycap.rr.com
Reply with quote
war2ladder
Newbie


Joined: 03 May 2002
Posts: 0

PostPosted: Wed Apr 03, 2002 3:44 am   
 
Email sent!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net