A=B
Portal Maze
This problem is so great!
Hard.
I managed to solve it in 29 lines.
_=

A=(end)?a
B=(end)b

(once)b=b||||||
||||||h=h||||||
||||||p=p||||||
||||||a=&a
&=(end)^^^^^^^
p^=(end)p
b^=(end)b
h^=(end)h
|^=(end)|
a^=(end)a

p|p=p
p||p=p
ph|p=h
p|b|ph=b
ph|ap=ha

ab=(return)true
bp=pBb
pha=hap
pa=aAp
(once)ap=aAp
(once)pb=pbB

ha|=a
ah=ha
hp=ph
p=

=(return)false

I'd like to see if there are shorter solutions.
< >
Showing 1-6 of 6 comments
Zill  [developer] 23 Apr, 2022 @ 1:36pm 
well done and thx for playing! i'd like to share my original solution here (30 lines):
_=

ba=(return)true
ab=(return)true
ha=ah
hb=bh
hp=ph
pa=ap
pb=bp

L=(start)l
alll|b=(return)true
blll|a=(return)true
allll||b=(return)true
bllll||a=(return)true
la=al
lb=bl
lh=hl
l|=|l
llp=bll
lp=al
l=
bp=bLL
ap=aL
p=

bh=b
h|ah=ah
h|h=h
ahhh=ahh
ahh=aLLLL
ah=aLLL

=(return)false
沐岚 7 Sep, 2023 @ 7:59am 
28 lines.
_=
|ha|h|b=(return)true
p=12
2|1=
2||1=
2|h|1=
a2|b|1h=(return)true
h2|b|1a=(return)true
2|||1=
b1=1b
a1=1a
h1=1h
2b=b2
2h=h2
2a=a2
2=
1=
ha|b=(return)true
hb=b
||hha=a
|hah|=ah
|ha=a
ha|=a
ah=ha
h=
ba=(return)true
ab=(return)true
=(return)false
295820878 18 Feb, 2024 @ 6:10am 
22 lines

#Default text size suggested. Max 50 chars / line.

#basic:
_=

#rename:
a=hhhhhh #<6h> save swapping costs

#no success merging 2 pairs
#pp=p and
#Uhp=true in the way.
#swaps:
#ah = saved
hhhhhhb=(return)true #ab = return true
bh=hb
hp=ph
pp=p #no two "you"s in one zone
#a sees p then a sees b
#then |a(h..)| h is ready
#portal:
u=(start)U #signal of using portal
#uu means can land=true
#b||ap|hp, b||p|ahp
#,etc. are too long.
Uph=(return)true #land with hammer
UUp=(return)true #fly with hammer
Ub=bU
Uh=hU #pass
U|=|U
Up=aU #land

phhhhhhh=uuhhhhhhh #uu means "can land=true"
phhhhhh=uhhhhhh #normal portal using


#hammer:
(once)=|||||| #for hammers
(once)=(end)||||||

|h|=| #lonely hammer
#below is wrong only in:
#h|ah||b

#|h|=| is for this only.
hhhhhhhhh=(return)true #<9h=ahhh> 3 hammers=true
# 3h -> at most 2 |s
|hhhhhhhh|=ah #<8h=ahh> break walls
|hhhhhhh|=a #<7h=ah> break walls


=(return)false
295820878 18 Feb, 2024 @ 7:02am 
small modification
20 lines

_=
a=hhhhhh
bh=hb
hp=ph
pp=p
u=(start)bb
bbph=(return)true
bbbbp=(return)true
bb|=|bb
bbp=abb
phhhhhhh=uuah
phhhhhh=ua
(once)=||||||
(once)=(end)||||||
|h|=|
hhhhhhhhh=(return)true
|hhhhhhhh|=ah
|hhhhhhh|=a
hhhhhhb=(return)true
=(return)false
295820878 19 Feb, 2024 @ 7:05pm 
More update:
17 lines
a=hhhhhh
bh=hb

hp=ph
pp=p
u=(start)bb
bb|=|bb
bbp=abb

(once)=|||
(once)=(end)|||
|h|=|
_=
phhhhhh=ua
hhhhhhb=(return)true
hhhhhhhhh=(return)true
|hhhhhhhh|=ah
|hhhhhhh|=a
=(return)false

comments:

Reduced "bbph=(return)true" and double "u".
This is because after landing, if there's a "you" with hammer, while "you" and target are separated, it must be like "ah|a|b" or so. No space for walls to block the path. And in the code, "ah" breaks wall, meeting another"a", leading to <9h>=(return)true.
"<9h>=(return)true" and "|<8h>|=ah" can be changed to "|||b|||=(return)false" and <8h>=(return)true. This is because the only "false" result with <8h> are from "b|||ahh" and "ahh|||b".

No success compacting "_=", "(once)=|||", and "(once)=(end)|||".
295820878 25 Apr, 2024 @ 11:23pm 
16 lines
_=(end)|
(once)=|_|_|_
a=hhhhh
bh=hb
ph=hp
u=(start)bb
bbp=abb
bb|=|bb
pp=p
|h|=|
hhhhhp=uhhhhh
hhhhhb=(return)true
|||b|||=(return)false
hhhhhhh=(return)true
|hhhhhh|=hhhhh
=(return)false
< >
Showing 1-6 of 6 comments
Per page: 1530 50