CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 01:15:17 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=3bfb30509edab36f5a14e72df6114a6f627d0eeae449fe9964a9b758bbfc5cada%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22FTs57bhAzo2eDqmb2aUBB_BKCiHYSk7q%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d2beca48dcf424-BLR
pushed some issues into computational leaves - Pastebin.com
SHARE
TWEET

pushed some issues into computational leaves
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NB. true for rows in x which index true value in y
- validIn =: (<"1@(|~ #) { ]) *. (|~ #) -:"1 [
- filter =: 1 : '#~ u' NB. removes all elements of y where u(y[i]) is false
- manhattanDistance =: +/@:|@:- NB. x={vect}, y={vect}; z={num}dist
- manhattanDeltas=: 3 :'(,-)=i.#$y' NB. unit vectors oriented on coordinate axes
- NB. x = [[bit]] valid squares
- NB. y = [num] index
- NB. z = [[num]] neighbors
- gridNeighbors =: 1 : 0
- [: validIn&m filter (manhattanDeltas m) +"1 ]
- )
- NB. m = [[bit]] valid squares
- NB. y = Path<tuple>
- NB. z = [Path<tuple>] extended paths
- gridExtendPath =: 1 : 0
- > <@,"_ 1 m gridNeighbors@{:@>
- )
- NB. x = Node goal
- NB. u = (Path<Node>)->[Path<Node>] extendPath
- NB. v = (Node,Node)->num heuristicDist
- NB. y = Node start
- NB. z = Path<Node> shortest path
- aStar =: 2 : 0
- :
- closed =. (0,$y) $ 0
- frontier =. ,<,:y
- while. #frontier do.
- currentPath =. {. frontier
- frontier =. }. frontier
- last =. {: > currentPath
- if. last e. closed do. continue. end.
- if. last -: x do. >currentPath return. end.
- closed =. closed, last
- frontier =. frontier, u currentPath
- NB. SORT FRONTIER
- scores =. (# + x v {:)&> frontier
- frontier =. frontier /: scores
- end.
- exception_message=:'No path found.' throw.
- )
- exampleG =: '#' = ];._2]0 :0
- ....##..##
- .##.##..##
- #..#####..
- #.#...##..
- .##...###.
- .##.####.#
- ..#..##.#.
- ###.##..##
- #.#####..#
- ...####..#
- )
- exampleSolution =: 0 8 (((|:exampleG) gridExtendPath) aStar manhattanDistance) 5 0
- NB. to inspect this solution, use:
- '*' (<"1 exampleSolution)} '.#' {~ |:exampleG
- NB. or
- '*' (<@|."1 exampleSolution)} '.#' {~ exampleG
Advertisement
Add Comment
Please, Sign In to add comment
-
✅⭐ Make huge profits on trading ⭐⭐ P
JavaScript | 7 sec ago | 0.25 KB
-
⭐⭐⭐MAKE $9OO INSTANTLY D M⭐⭐
Java | 7 sec ago | 0.10 KB
-
⭐⭐⭐Make $15OO in 2O minutesV E⭐⭐
Java | 10 sec ago | 0.10 KB
-
📝 Crypto Swap Glitch ✅ Working
JavaScript | 12 sec ago | 0.24 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 15 sec ago | 0.25 KB
-
📝 EASY MONEY GUIDE ✅ Working
JavaScript | 21 sec ago | 0.24 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ E
JavaScript | 24 sec ago | 0.25 KB
-
📌 ChangeNOW Exploit
JavaScript | 30 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand