Search found 19 matches

by JackBauer
Sun Nov 13, 2005 7:36 pm
Forum: Algorithms
Topic: Artificial Intelligence (project)
Replies: 2
Views: 1305

Thanks for your input. One other question: in simulations of this type, where multiple-agents may interact at the same time, how you suggest handling with the situation where two agents get to the same position at the same time? The map zone could allow multiple agents (example 1 in each direction)....
by JackBauer
Thu Oct 27, 2005 10:10 pm
Forum: Other words
Topic: Representation of maps
Replies: 0
Views: 1149

Representation of maps

Hey, searching for some tips on map representation. The point is creating a map builder (using small componentes that represent road structure) that constructs the map (on screen and then internally in some structure like a graph). Then the program will have access to that internal structure. Inform...
by JackBauer
Wed Oct 26, 2005 10:48 pm
Forum: Algorithms
Topic: Artificial Intelligence (project)
Replies: 2
Views: 1305

Artificial Intelligence (project)

Hello, can you give some hints on what to learn (algorithms/techniques...) in order to do a program wich allows an artificial agent to 1) go around in a map it doesn't know, learning it 2) the agent is allowed some time to learn the map... then the agent would receive an order (go to position x) and...
by JackBauer
Fri Apr 01, 2005 7:37 pm
Forum: Algorithms
Topic: Critical tests..
Replies: 3
Views: 1258

I am not really experienced, and sometimes fail to those limit conditions, but here are a few things. I think it's related to the limits of the problem. In example, some problem that requires a calculation on a given input N (integer between -3 and 33). In this case -3 and 33 would be the limits. Pa...
by JackBauer
Wed Mar 30, 2005 4:58 pm
Forum: Volume 4 (400-499)
Topic: 445 - Marvelous Mazes
Replies: 93
Views: 10652

After trying a few ways my program still gets PE.

Tried with \n after the last output, PE.
Tried without \n after the last out, PE.

Does anyone have some crazy input to test this to see if proper formating fails in some case?

Thanks.
by JackBauer
Mon Mar 28, 2005 9:34 pm
Forum: Algorithms
Topic: Problem help (prerequesites problem from topcoder)
Replies: 1
Views: 909

Problem help (prerequesites problem from topcoder)

Hello, can someone give me some tips and hints to solve this problem (I don't want no full code or full algorithm)? This is a problem from top coder. Actually it's a subset of that problem since I just want some ideas and this is the part I have trouble with. The other parts include sorting. If some...
by JackBauer
Wed Mar 23, 2005 9:25 pm
Forum: Algorithms
Topic: Simple binary tree problems?
Replies: 0
Views: 730

Simple binary tree problems?

Hello,

does anyone know some simple binary tree problems? I'm learning those DataStructures and wanted to have some practice. Thanks.
by JackBauer
Mon Dec 20, 2004 1:57 pm
Forum: Algorithms
Topic: Finding stuff within a grid - aproaches
Replies: 3
Views: 1216

Thanks for the input so far. I'll check the "dx dy" example given previously. Check for each piece b, if abs(a.column/column_size-b.column/column_size)==abs(a.row/row_size-b.row/row_size). If this condition is true, then piece a can reach piece b diagonally. However, you also need to check to see if...
by JackBauer
Sun Dec 19, 2004 12:30 am
Forum: Algorithms
Topic: Finding stuff within a grid - aproaches
Replies: 3
Views: 1216

Finding stuff within a grid - aproaches

Hello, if we have a grid that has some stuff and we need to search it in several directions, what's the best approach ? Loop each direction? Or have a single loop like: interation = 0; while (condition) iteration++; x = i+iteration; y = j+iterarion; /* check direction 1 */ if ( first ) { if ( matrix...
by JackBauer
Sun Nov 28, 2004 5:02 pm
Forum: Volume 102 (10200-10299)
Topic: 10205 - Stack 'em Up
Replies: 60
Views: 23191

little joey wrote:You assume that only one exchange can happen during each shuffle, but in fact any permutation of the cards can happen during one shuffle.
In the first shuffle of the sample input both (0 <-> 1) and (50 <-> 51) take place!
Didn't read the example input properly. Thanks for your help.
by JackBauer
Sun Nov 28, 2004 3:05 am
Forum: Volume 102 (10200-10299)
Topic: 10205 - Stack 'em Up
Replies: 60
Views: 23191

10205

Hello, is problem's 10205, Stack 'em Up, out, output example correct ? Let's see: the sequence starts with: 0 | 1 | 2 | 2 | ... | 50 | 51 1 | 2 | 3 | 4 .... | 51 | 52 (first line is array index) And they say there are two shuffles: 1st (x = 0, y = 1) 2nd ( x=0, y=51) SO shuffle #1 changes to: 2 | 1 ...
by JackBauer
Thu Nov 11, 2004 9:41 pm
Forum: Other words
Topic: Data Structures and Algorithms in Java - Any good?
Replies: 2
Views: 1154

Guess no one knows this...

If someone has read and recommends some Java oriented Data Structures text, please say so. Other languagens are also welcomed - just more fluent in Java.

Thanks.
by JackBauer
Thu Oct 28, 2004 10:16 pm
Forum: C
Topic: why this return?
Replies: 2
Views: 1877

why this return?

Hello, what's the point of having something like this: char * strcat ( char *dest, char *orig ) { int i, len; for (i=0,len=strlen(dest);orig[i]!='\0' ;i++,len++) { dest[len] = orig[i]; } dest[len] = '\0'; return dest; } (This code was copied from a book) What I don't understand is: why is there a re...
by JackBauer
Wed Oct 27, 2004 11:12 pm
Forum: Volume 101 (10100-10199)
Topic: 10197 - Learning Portuguese
Replies: 45
Views: 15836

Thanks,

indeed that breaks my code since I was assuming the english verb part would be a single word.

Fixed that, still gives WA.
by JackBauer
Wed Oct 27, 2004 1:19 am
Forum: Volume 101 (10100-10199)
Topic: 10197 - Learning Portuguese
Replies: 45
Views: 15836

Hello, I'm having trouble with this same problem. I'll use this thread to avoid creating a new one. The code is getting WA. My algorithm and some implementation info: while loop fetching two strings with scanf until eof show the portuguese verb and the english correspondent get last char and the tv ...

Go to advanced search