Posts for Brandon


Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
Great. Should someone confirm what I should do with the original video? Delete it? Keep it and rename it or something? Edit: IRC confirms that I should delete, so I deleted.
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
So what do I do with it then? And yes, that's a little off-topic, but I'll take that into consideration for later encodes.
All the best, Brandon Evans
Post subject: Not a WAVE file?
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
I'm encoding this publication, and after extracting the .wav file and trying to convert to a .flac, it says "WARNING: hd.wav is not a WAVE file; treating as a raw file," and then goes on to say how I need to specify more parameters for that to work. This has never happened before; why would this happen now? Does it relate to the massive length? The video encodes perfectly fine.
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
Fixed video will be found here. If this is better than the original, I'll delete the original. Let me know.
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
*sigh*, it appears that I forgot to do the necessary adjustments for handheld games. I'm redoing it now...
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
HD upload will be here shortly.
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
Encoded, but currently having issues with archive.org and can't upload the SD.
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
What do you think? By the way, this has already been optimized. Lastly, the HD encode is running, and will be done in the morning. I'll upload it shortly after.
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
Claiming for HD encoding / screenshot.
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
All fixed.
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
SD encode fixed. The 512kb version will be corrected shortly as well. Sorry for all the trouble folks.
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
I gave ledauphinbenoit a rundown on the process. Here's hoping he uploads some encodes!
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
Sonikkustar wrote:
There is a timing error. The encode says 11:05.82 when it should say 18:29.26
Whoops, my bad. I'll correct this shortly. By the way, this was the first TAS my sister ever saw, and she's wondering how long it took the author to make it.
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
Will encode to SD shortly.
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
Patashu wrote:
Once you implement the mechanics of the game within your bot, all you need to do is an alpha-beta pruned search for long combos.
Please do elaborate. By game mechanics, do you mean an engine in which the bot can make moves? Because I have that as of now. I don't know anything about alpha-beta pruned searches either.
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
Another update: I created a very primitive solve function that tries to solve horizontally and vertically for 3 blocks. When it's not doing anything else, and there are less than 6 rows with blocks in them, it will raise the blocks. It takes in no consideration for the grid raising or for gravity, and it doesn't know how to make combos / chains / break garbage on purpose. That said, if you give it enough time, it can at least beat a level 1 computer in Very Hard mode, and that's certainly a good start. You can see the modified code in the first post. Thanks Dacicus for your help with labeling garbage, though note that I check for when that field is not 0, as there are more options than just 0 and 4 (Consider the case of metal garbage).
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
Well, I finally did something new towards this effort. With Dacicus' information, I created an array from the playing grid, and displayed a text version of it. You can see my modified code on the first post. In addition, I have made some extensions on Dacicus' data: 6 = Upside Down Triangle 7 = Exclamation Point x = Garbage. When I say x, I mean that garbage blocks have shown up as all different numbers (Though a lot of them tend to be 6s). As such, I figure there must be some other memory address that says if a particular block is garbage or not. Dacicus, are you up to the challenge of finding what these addresses are?
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
Dacicus wrote:
7E1860 is the tile at the lower left corner. The address increases by 2 going right. The leftmost tile one row above is 7E1850, etc. The actual values are 0 = empty, 1 = heart, 2 = circle/octagon, 3 = triangle, 4 = star, 5 = diamond 7E1870 etc holds the oncoming row
As my computer is overloaded with encodes, I can't exactly test this, but I definitely want to post all of the data related to this in this topic. Thanks for your help!
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
Hello all, I'm planning on making my first TAS. My goal is to make one in which I complete Very Hard mode of the classic puzzle game "Panel de Pon" as fast as possible. Although I'm debating this, I am hoping to accomplish this all with a Lua bot and zero human input. I want this for a multitude of reasons:
  1. The bot could probably run on multiple versions of the same game, so long as the memory addresses are slightly modified.
  2. Improving on the speed would be a lot simpler than redoing the entire game.
  3. It could serve as an educating experience for both myself and the TAS community.
  4. AI is fun!
In its current form, it will navigate to VS, select Very Hard mode, start the match, and move to a particular location on the grid. Also, it defines a function "cursor" that can be used to tell the bot to move the cursor so that the left cursor box is at the given column (Which can be anything integer 0 to 4) and row (Which can be anything integer 0 to 10) of the 11x5 playing grid. Presumably, the next step is to parse the grid and to have the bot decide what moves to make accordingly. So, if anyone has any ideas or wants to contribute, I'm all ears. My current code can be seen below:
Language: lua

function chain() end function cursor(col, row) local mode while mode == nil or mode == 1 do mode = memory.readbyte(0x7E00B1) local coal = memory.readbyte(0x7E03A6) local roal = 15 - memory.readbyte(0x7E03AA) if coal > col then press(1, {left=true}) end if coal < col then press(1, {right=true}) end if roal <row> row then press(1, {down=true}) end if coal == col and roal == row then break end end end function draw() local grid = parse() local ascii = '' for row = 11, 1, -1 do ascii = ascii .. '|' for col = 1, 6 do ascii = ascii .. grid[col][row] .. '|' end ascii = ascii .. '\n' end gui.text(105, 0, ascii) end function parse() local array = {} for col = 0, 5 do local entry = {} for row = 0, 10 do local address = 0x7E1860 + (col * 2) - (row * 0x10) local value = memory.readbyte(address) if memory.readbyte(address + 1) ~= 0 then value = 'G' end table.insert(entry, value) end table.insert(array, entry) end return array end function press(controller, buttons) joypad.set(controller, buttons) draw() emu.frameadvance() gui.text(0, 0, tostring(buttons)) for index, value in pairs(buttons) do buttons[index] = false end joypad.set(controller, buttons) draw() emu.frameadvance() end function solve() local grid = parse() for row = 1, 11 do local blocks = {} for col = 1, 6 do local block = tostring(grid[col][row]) if blocks[block] == nil then blocks[block] = 0 end blocks[block] = blocks[block] + 1 end for index, value in pairs(blocks) do if index ~= '0' and index ~= 'G' and value > 2 then for col = 1, 5 do if tostring(grid[col][row]) == index then if tostring(grid[col + 1][row]) == index then break end cursor(col, row) press(1, {A=true}) end end for col = 6, 2, -1 do if tostring(grid[col][row]) == index then if tostring(grid[col - 1][row]) == index then break end cursor(col - 1, row) press(1, {A=true}) end end end end end for group = 1, 11 do local blocks = {} for i = 1, 7 do blocks[tostring(i)] = true end for row = 0, 2 do local missing = {} for i = 1, 7 do missing[tostring(i)] = true end for col = 1, 6 do missing[tostring(grid[col][group + row])] = nil end for index, value in pairs(missing) do blocks[index] = nil end end for index, value in pairs(blocks) do for row = 0, 1 do local start = -1 local finish = -1 for col = 1, 6 do if tostring(grid[col][group + (row * 2)]) == index then start = col break end end for col = 1, 6 do if tostring(grid[col][group + 1]) == index then finish = col break end end if start == -1 or finish == -1 then break end while start <finish> finish do cursor(start - 1, group + (row * 2)) press(1, {A=true}) start = start - 1 end end end end for row = 11, 1, -1 do for col = 1, 6 do if grid[col][row] ~= 0 and grid[col][row] ~= 'G' and row ~= 0 then if col ~= 1 and grid[col - 1][row - 1] == 0 then cursor(col - 1, row) press(1, {A=true}) end if col ~= 6 and grid[col + 1][row - 1] == 0 then cursor(col, row) press(1, {A=true}) end end end end for col = 1, 6 do if grid[col][6] ~= 0 and grid[col][6] ~= 'G' then return end end press(1, {R=true}) end while true do local menu = memory.readbyte(0x7EA138) if memory.readbyte(0x7E5564) ~= 0 and menu == 0 then press(1, {A=true}) end if menu == 1 then press(1, {A=true}) end if menu == 6 then press(1, {up=true}) press(1, {A=true}) end if menu == 10 then if memory.readbyte(0x7E9677) == 126 then press(1, {left=true}) elseif memory.readbyte(0x7E9677) == 109 then press(1, {A=true, L=true, up=true}) elseif memory.readbyte(0x7E00B1) == 1 then solve() else press(1, {start=true}) end end draw() emu.frameadvance() end
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
I play some drums. You can see a compilation of my skills here.
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
Apparently, I can now upload videos that are more than 15 minutes long: http://www.youtube.com/watch?v=rDANVSAJiDo
All the best, Brandon Evans
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee
Brandon
He/Him
Editor, Experienced Forum User, Published Author, Player (190)
Joined: 11/21/2010
Posts: 913
Location: Tennessee