Datasets:

Modalities:
Text
Formats:
text
Size:
< 1K
ArXiv:
Libraries:
Datasets
License:
File size: 2,388 Bytes
f4955f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
id: "dynamic_switch_alarm"
name: "Dynamically switch the alarm"
description: "Switch the alarm according to the weather"

setup_steps: {
	adb_call: { rotate: { orientation: PORTRAIT_0 } }
}

reset_steps: [
	{ adb_call: { force_stop: { package_name: "com.google.android.deskclock" } } },
	{ adb_call: { force_stop: { package_name: "mobi.lockdown.weather" } } },
	{ adb_call: { press_button: { button: HOME } } },
	{
		adb_call: {
			start_activity: {
				full_activity: "mobi.lockdown.weather/mobi.lockdown.weather.activity.SplashActivity"
			}
		}
		success_condition: {
			wait_for_app_screen: {
				app_screen: {
					activity: "mobi.lockdown.weather/mobi.lockdown.weather.activity.SplashActivity"
				}
				timeout_sec: 10.0
			}
			num_retries: 3
		}
	}
]

event_sources: {
	view_hierarchy_event: {
		selector: '#"mobi.lockdown.weather:id/day1" #$"tvPop"'
		properties: {
			property_name: "text"
			pattern: "[1-6]?\\d%"
		}
	}
	id: 1
}
event_sources: {
	view_hierarchy_event: {
		selector: '#"mobi.lockdown.weather:id/day1" #$"tvPop"'
		properties: {
			property_name: "text"
			pattern: "(?:[7-9]?\\d|100)%"
		}
	}
	id: 2
}
event_sources: {
	view_hierarchy_event: {
		selector: '#"com.google.android.deskclock:id/digital_clock"[text="8:00\xe2\x80\x8aAM"]+#$"onoff".$"Switch"'
		properties: {
			property_name: "text"
			pattern: "ON"
		}
		properties: {
			property_name: "checked"
			pattern: "true"
		}
	}
	id: 3
}
event_sources: {
	view_hierarchy_event: {
		selector: '#"com.google.android.deskclock:id/digital_clock"[text="8:00\xe2\x80\x8aAM"]+#$"onoff".$"Switch"'
		properties: {
			property_name: "text"
			pattern: "OFF"
		}
		properties: {
			property_name: "checked"
			pattern: "false"
		}
	}
	id: 4
}

event_slots: {
	reward_listener: {
		type: OR
		events: {
			event: {
				id: 5
				events: { id: 1 }
				transformation: "y = 0"
			}
		}
		events: {
			event: {
				id: 6
				events: { id: 2 }
				transformation: "y = 0"
			}
		}
		events: {
			event: {
				id: 7
				events: { id: 3 }
				prerequisite: 5
				transformation: "y = 1"
			}
		}
		events: {
			event: {
				id: 8
				events: { id: 4 }
				prerequisite: 6
				transformation: "y = 1"
			}
		}
	}
	episode_end_listener: {
		type: OR
		events: [
			{ id: 7 },
			{ id: 8 }
		]
		transformation: "y = True"
	}
}

command: "Turn off my alarm in the morning if it will rain tomorrow, otherwise leave it on."