mirror of
https://github.com/KrisKennaway/ii-vision.git
synced 2024-08-31 14:29:14 +00:00
- Stop using the 5x weighting for diff values, it was preventing from
consistently finding enough additional offsets (~2.5x avg instead of >2.9) - Remove instrumentation for fill rate now that it's served its purpose
This commit is contained in:
parent
0a3c81c8c6
commit
f7f5950637
@ -546,8 +546,7 @@ class Bitmap:
|
|||||||
new_diff = self._diff_weights_page(
|
new_diff = self._diff_weights_page(
|
||||||
packed_page, packed_page, is_aux, content)
|
packed_page, packed_page, is_aux, content)
|
||||||
|
|
||||||
# TODO: try different weightings
|
return new_diff - diff_weights
|
||||||
return (new_diff * 5) - diff_weights
|
|
||||||
|
|
||||||
|
|
||||||
class HGRBitmap(Bitmap):
|
class HGRBitmap(Bitmap):
|
||||||
|
@ -34,9 +34,6 @@ class Video:
|
|||||||
self.frame_number = 0 # type: int
|
self.frame_number = 0 # type: int
|
||||||
self.palette = palette # type: Palette
|
self.palette = palette # type: Palette
|
||||||
|
|
||||||
self._opcodes = 0
|
|
||||||
self._offsets = 0
|
|
||||||
|
|
||||||
# Initialize empty screen
|
# Initialize empty screen
|
||||||
self.memory_map = screen.MemoryMap(
|
self.memory_map = screen.MemoryMap(
|
||||||
screen_page=1) # type: screen.MemoryMap
|
screen_page=1) # type: screen.MemoryMap
|
||||||
@ -91,8 +88,6 @@ class Video:
|
|||||||
memory_map.page_offset[screen.SCREEN_HOLES]) == 0
|
memory_map.page_offset[screen.SCREEN_HOLES]) == 0
|
||||||
|
|
||||||
print("Similarity %f" % (update_priority.mean()))
|
print("Similarity %f" % (update_priority.mean()))
|
||||||
if self._opcodes:
|
|
||||||
print("Opcode fill rate %f" % (self._offsets / self._opcodes))
|
|
||||||
|
|
||||||
yield from self._index_changes(
|
yield from self._index_changes(
|
||||||
memory_map, target, update_priority, is_aux)
|
memory_map, target, update_priority, is_aux)
|
||||||
@ -186,9 +181,6 @@ class Video:
|
|||||||
if len(offsets) == 3:
|
if len(offsets) == 3:
|
||||||
break
|
break
|
||||||
|
|
||||||
# Record how many additional offsets we were able to fill
|
|
||||||
self._opcodes += 1
|
|
||||||
self._offsets += len(offsets)
|
|
||||||
# Pad to 4 if we didn't find enough
|
# Pad to 4 if we didn't find enough
|
||||||
for _ in range(len(offsets), 4):
|
for _ in range(len(offsets), 4):
|
||||||
offsets.append(offsets[0])
|
offsets.append(offsets[0])
|
||||||
|
Loading…
Reference in New Issue
Block a user