On Fri, Jul 13, 2012 at 10:00 AM, Max Harms wrote:
> You're suggesting that the lengths of each path be handled in a different
> data structure than the paths themselves, yes? That could work, but I'm not
> convinced it's actually cleaner than my implementation. While it's true
> that it makes thi
Hey Raul, sorry for the delay in responding.
> > I'd like my A*
> > program to work on arbitrary graphs, where a step from one space to
> another
> > can have any non-negative real length. Thus it doesn't work to simply
> count
> > the length of the path for the general case.
>
> Can you show me
On Wed, Jul 11, 2012 at 1:28 PM, Raul Miller wrote:
> I should have been using (|~ #)"1 instead of bare (|~ #).
This was wrong.
Here's a working implementation of validIn:
validIn =: (<@(|~ #)"1 _ { ]) *. (|~ #)"1 _ -:"1 [
Example use:
(#~ validIn&(?5 5$2)) <:(#: [: i. */) 2+5 5
--
Raul
-
On Wed, Jul 11, 2012 at 12:36 PM, Max Harms wrote:
> A few aren't what I'm looking for though. One of the biggest is that while
> my example happened to have steps with uniform length, I'd like my A*
> program to work on arbitrary graphs, where a step from one space to another
> can have any non-n
Thanks, Raul. Some of these changes are great.
A few aren't what I'm looking for though. One of the biggest is that while
my example happened to have steps with uniform length, I'd like my A*
program to work on arbitrary graphs, where a step from one space to another
can have any non-negative real
There's a change I am tempted to make, but I think it would make the
code more complex.
So, instead, here's some "simplifications":
http://pastebin.com/xa5cgLwF
Here's a brief recap of my thinking:
J nouns know how big they are, so we should not add complexity to our
data structures to keep a r
Oh, yes. It seems that e. is exactly what I was looking for when I made
contains. Thanks. :D
- Max
On Mon, Jul 9, 2012 at 1:48 PM, Raul Miller wrote:
> On Mon, Jul 9, 2012 at 12:14 PM, Max Harms wrote:
> > http://pastebin.com/RjQA69j6
>
> I put up a slightly modified version of this
>
> http:
On Mon, Jul 9, 2012 at 12:14 PM, Max Harms wrote:
> http://pastebin.com/RjQA69j6
I put up a slightly modified version of this
http://pastebin.com/diff.php?i=rBmYn6R1
Mostly, I replaced contains with e.
I keep thinking I made a mistake, looking at the diffs, but I think
that's a pastebin bug.
I imagine that it was stuck and not detecting that it's stuck.
Your new version worked (after I replaced g with exampleG on the last
line. I'll try taking a look at it later today.
By the way, my email habits keep wanting me to change your definition of g to
#: 51 435 636 652 398 445 154 947
Sorry. I should've included actual data, rather than a random grid. Try
this:
g =: 10 10 $ (0 0 0 0 1 1 0 0 1 1 0 1 1 0 1 1 0 0 1 1 1 0 0 1 1 1 1 1 0 0 1
0 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 0 1 1 1 1 0 1 0 0 1 0 0 1 1 0 1
0 1 1 1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 0 0 1 0 0 0 1 1 1 1 0 0 1)
Are
I'm running this right now...
g =: ? 10 10 $ 2
0 8 ((g gridExtendPath) aStar manhattanDistance) 5 0
... but it's taking a long time.
And without a working example that I can repeat, I cannot easily
investigate the numbers.
Meanwhile
'Z' (graphExtendPath aStar 1:) 'A'
doesn't work becau
g =: ? 10 10 $ 2
0 8 ((g gridExtendPath) aStar manhattanDistance) 5 0
Hypothetical Dijkstra's Search on an arbitrary graph:
'Z' (graphExtendPath aStar 1:) 'A'
Hypothetical A* for hex grid:
goal (hexGridExtendPath aStar euclideanDistance) start
- Max
On Sun, Jul 8, 2012 at 11:02 PM, Raul Miller
On Sat, Jul 7, 2012 at 8:59 PM, Max Harms wrote:
> Here's the functioning code if you're curious: http://pastebin.com/RjQA69j6
I'm curious.
How do you use this? (What are some sample sentences.)
[Especially when you are working with adverbs and conjunctions, but
also even with verbs, examples
essage-
> From: programming-boun...@jsoftware.com [mailto:
> programming-boun...@jsoftware.com] On Behalf Of Max Harms
> Sent: Saturday, July 07, 2012 4:43 PM
> To: Programming forum
> Subject: Re: [Jprogramming] Domain error for explicit conjunction
>
> Oh. My. Zeus.
>
> Turns o
Max Harms
Sent: Saturday, July 07, 2012 4:43 PM
To: Programming forum
Subject: Re: [Jprogramming] Domain error for explicit conjunction
Oh. My. Zeus.
Turns out it works iff the colon is the first character on the line *including
whitespace*. When I was writing it I was tabbing-in, and thus
It worked for me as Henry Rich promised on j701jhs
Linda
-Original Message-
From: programming-boun...@jsoftware.com
[mailto:programming-boun...@jsoftware.com] On Behalf Of Max Harms
Sent: Saturday, July 07, 2012 3:19 PM
To: Programming forum
Subject: Re: [Jprogramming] Domain error for
The same turns out to be true for version 602. When I tested using version
602 I put the colon as the first character of the line, as is my habit, but
with leading whitespace the same error results.
On Sat, Jul 7, 2012 at 4:43 PM, Max Harms wrote:
> Oh. My. Zeus.
>
> Turns out it works iff the
Oh. My. Zeus.
Turns out it works iff the colon is the first character on the line
*including whitespace*. When I was writing it I was tabbing-in, and thus it
was breaking. >_<
Thanks a bunch, :)
- Max
On Sat, Jul 7, 2012 at 4:12 PM, Henry Rich wrote:
> Here's a session log
>
> toy =: 2 :
Here's a session log
toy =: 2 : 0
:
z =: u v ''
x + y
)
[ toy ]
[ (2 : 0) ]
:
z=:u v''
x+y
)
5 [ toy ] 7
12
You gotta put in the colon :
Henry Rich
On 7/7/2012 3:18 PM, Max Harms wrote:
> Tried it. Didn't work. Same result. (Perhaps because I'm using 701?)
>
> - Max
>
> On Sat, Ju
Henry's version works for me in J701. There are relatively few engine
differences between 602 and 701. It is much more likely that there is a
typo or some human error. I suggest trying again and being very sure
everything is proper. Check the display of toy before trying to use it.
On Sat, Jul 7,
I have confirmed that Henry's solution works under J6.02 so this does
appear to be a flaw in J7
--Tracy
On Sat, Jul 7, 2012 at 3:18 PM, Max Harms wrote:
> Tried it. Didn't work. Same result. (Perhaps because I'm using 701?)
>
> - Max
>
> On Sat, Jul 7, 2012 at 3:12 PM, Henry Rich wrote:
>
>
Tried it. Didn't work. Same result. (Perhaps because I'm using 701?)
- Max
On Sat, Jul 7, 2012 at 3:12 PM, Henry Rich wrote:
> You defined a conjunction that produces only a monadic valence. Try
>
> toy =: 2 : 0
> :
> z =: u v ''
> x + y
> )
>
> Henry Rich
>
> On 7/7/2012 2:38 PM, Max Harms w
You defined a conjunction that produces only a monadic valence. Try
toy =: 2 : 0
:
z =: u v ''
x + y
)
Henry Rich
On 7/7/2012 2:38 PM, Max Harms wrote:
> toy =: 2 : 0
> z =: u v ''
> x + y
> )
--
For information about J forums
Hello,
I'm getting a domain error when I try to invoke (the verb result of) a
custom conjunction. I think I boiled it down to this toy example:
toy =: 2 : 0
z =: u v ''
x + y
)
5 [ toy ] 7
|domain error
| 5[toy]7
Any help would be great. :)
- Max
-
24 matches
Mail list logo